shadcn.io is not affiliated with official shadcn/ui
Dialog examples · Standard
Scrollable with Sticky Header Dialog for React
A changelog dialog whose header stays in place while the release notes scroll beneath it.
Framework
UI library
When the header scrolls away, people lose track of what they're reading. This React dialog keeps the Changelog title and its border in place while the release notes scroll in a Scroll Area beneath it. It's shadcn.io's Dialog on Base UI.
Preview
Installation
Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
FAQ
How does the header stay in place?
Only the scroll area scrolls. DialogContent takes gap-0 p-0, the header gets its own padding and a border-b, and the scroll area sits between it and the footer.
Why the border under the header?
It marks where the fixed part ends and the scrolling part starts. The footer has a matching border-t.
Related
- Scrollable DialogA privacy policy dialog whose long text
- Standard DialogA share dialog with a read-only link, a
- Basic ScrollArea Scroll AreaA basic vertical scroll area for long
- Terms and Conditions DialogA terms dialog whose I Agree button stays
- Bottom-Sliding SheetA sheet that slides up from the bottom of
- Standard CardA basic card with a title, a description