shadcn.io is not affiliated with official shadcn/ui
Alert Dialog examples · Informational
Information with Long Content Alert Dialog for React
An informational dialog with long content that scrolls inside the dialog.
Some information doesn't fit in two sentences. This React alert dialog announces a privacy policy update with a list of key changes in an area that scrolls inside the dialog, so the button stays in reach. It's shadcn.io's Alert Dialog on Base UI.
Preview
Installation
FAQ
How tall should the scrolling area be?
max-h-60 shows several lines before scrolling while leaving room for the title and button on small screens.
How is the scrolling built?
The content sits in a div with max-h-60 overflow-y-auto, between the header and the footer, so only it scrolls.
List or paragraphs?
Both: a short lead-in, a list for the key points, a closing paragraph. Use real ul and li elements.
Should the button wait until people scroll to the end?
Rarely; for information, no. For terms people must accept, see the Terms and Conditions dialog example.
Related
- Simple Information Alert Alert DialogA simple informational dialog with one OK
- Information with Action Button Alert DialogAn informational dialog with a bell icon
- Standard DialogA share dialog with a read-only link, a
- Confirmation with Detailed Description Alert DialogA confirmation dialog that lists every
- Information with Icon Alert DialogAn informational dialog with an info icon
- Basic ScrollArea Scroll AreaA basic vertical scroll area for long