shadcn.io is not affiliated with official shadcn/ui
Drawer examples · Top
Top Drawer Notification Banner for React
A top drawer shaped as a banner, with an alert icon, a message, an Update Now button and a dismiss button.
A banner that slides down from the top: an alert icon, the message, Update Now and a dismiss button, on a lightly tinted strip. The title and description are the message itself, so the banner is announced as soon as it opens.
Preview
Installation
FAQ
What does the banner say?
DrawerTitle reads System Update Available and DrawerDescription reads A new version is available. Update now to get the latest features. Both sit beside the alert icon.
How is the banner colored?
With the info theme color: a light bg-info/4 fill, a border-info/32 bottom border and a text-info icon. Swap info for warning or destructive for other kinds of message.
How does the dismiss button work?
It's an icon-only DrawerClose with aria-label="Dismiss", so it closes the banner; the X is aria-hidden. Swiping up and Escape close it too.
What does Update Now do?
Nothing yet: it's a small outline Button with no handler. Start the update from it, then close the banner:
Pass open to Drawer; onOpenChange receives the next boolean.
Related
- Simple Top DrawerA drawer that slides down from the top
- Top Drawer Quick ActionsA top drawer with a three-column grid of
- Scrollable Bottom DrawerA bottom drawer with terms and conditions
- Top Drawer Command BarA top drawer with a large command field
- Top Drawer Search BarA top drawer with a large search field
- Bottom Drawer Event DetailsA bottom drawer with an event's badges