Blossom UI

Drawer

Drawer component that slides from the left or the right, with sizes, focus restoration and scroll lock.

How to use it

Run npx @blossomui/react add drawer, or copy src/components/UI/Drawer/Drawer.tsx into your React project and import it.

import { Drawer } from './components/ui/Drawer'

Props

DrawerProps

PropTypeDescription
closeLabelstringAccessible name of the close button.
open (required)boolean
onClose (required)() => void
title (required)string
children (required)ReactNode
footerReactNodeButtons shown at the bottom, for example Cancel and Save.
side'left' | 'right'
size'sm' | 'md' | 'lg'
closeOnBackdropbooleanClose when the user clicks outside the drawer.

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree