shadcn.io is not affiliated with official shadcn/ui
Drawer examples · Top
Top Drawer Quick Actions for React
A top drawer with a three-column grid of six quick action buttons, each an icon over a label.
Six quick actions in a top drawer: New File, Upload, Download, Share, Settings and More, as tall outline buttons in a three-column grid. Each button stacks its icon over its label, and the grid stays centered on wide screens.
Preview
Installation
FAQ
How is the grid laid out?
A grid grid-cols-3 gap-4, capped at max-w-2xl and centered with mx-auto. Each button is h-20 flex-col, so the icon sits over the label.
What do screen readers hear for each action?
The label, such as New File or Upload. The icons are aria-hidden.
Do the actions do anything?
Not yet: they're outline Buttons with no handler. Run each action from its button, and close the drawer once it starts:
Pass open to Drawer; onOpenChange receives the next boolean.
Why do New File and More share an icon?
Both use the plus icon in this demo. Give More its own icon, such as an ellipsis, so the two don't look alike.
Related
- Simple Top DrawerA drawer that slides down from the top
- Top Drawer Command BarA top drawer with a large command field
- Bottom Drawer with Snap PointsA bottom drawer that snaps to 148px
- Simple Context MenuA right-click area that opens Back
- Top Drawer Notification BannerA top drawer shaped as a banner, with an
- Top Drawer Search BarA top drawer with a large search field