shadcn.io is not affiliated with official shadcn/ui
Drawer examples · Top
Top Drawer Search Bar for React
A top drawer with a large search field above Recent Searches and Quick Access shortcuts.
Search that drops from the top: a large search field, then Recent Searches and Quick Access, each a short list of ghost buttons with an icon. The drawer's title is visually hidden, since the field leads the panel.
Preview
Installation
FAQ
How is the search field built?
An Input Group, h-12, with an InputGroupInput of type="search" and aria-label="Search", and the search icon in an InputGroupAddon after the input in the markup.
What's under the field?
Recent Searches, with Project files and Team documents, and Quick Access, with My Projects and Recent Files. Each section has a small uppercase heading.
Does typing show results?
Not in this demo: the field is uncontrolled. Keep the query in state and replace the two sections with matching results as people type.
Do the recent searches run anything?
No, they're ghost buttons with a clock, folder or file icon and no handler. Fill the field with the search, or open the place, from each one.
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 FormA bottom drawer with name, email and
- Top Drawer Notification BannerA top drawer shaped as a banner, with an
- Top Drawer Quick ActionsA top drawer with a three-column grid of
- Bottom Drawer Event DetailsA bottom drawer with an event's badges