Examples
Default
Without Overlay
Left
Controlled
Top
Props
Drawer
Root component that manages open/close state for a drawer. Wraps Radix Dialog.Root.boolean
default:"true"
Whether the default
DrawerOverlay is rendered. When false, modal is automatically set to false as well (unless explicitly overridden) so focus-trap and scroll-lock are disabled.DrawerClose
Closes the drawer when clicked. Can be placed anywhere inside the drawer. A direct re-export of the RadixDialogPrimitive.Close primitive. It accepts all of that primitive’s props, unchanged.
DrawerContent
The panel that slides in from the chosen edge. Renders inside a portal with an overlay backdrop by default. Includes focus-trap,aria-describedby, and Escape-to-close from Radix Dialog.
boolean
boolean
default:"true"
Whether to render the default
DrawerOverlay behind the content. Set to false to provide your own overlay or omit it entirely.Prefer setting overlay on the Drawer root instead so that modal is also adjusted automatically.DrawerOverlayProps
Props forwarded to the default
DrawerOverlay when overlay is true."top" | "bottom" | "left" | "right"
default:"right"
The edge from which the drawer slides in.Named
position (rather than side) to avoid confusion with the CSS side concept used by Radix Popover/Tooltip and to better convey the spatial relationship of the drawer to the viewport."md" | "sm" | "lg" | "full"
default:"sm"
Controls the maximum extent of the drawer panel. For left/right drawers this sets
max-width; for top/bottom it sets max-height."menu" | "sheet" | "panel"
default:"panel"
Visual treatment of the panel. Use
"sheet" (with position="bottom") for a bottom sheet with the modal surface treatment, or "menu" for a floating inset menu carrying the dropdown surface.DrawerDescription
An accessible description for the drawer, providing supplementary context.boolean
DrawerFooter
A semantic footer area for the drawer, typically containing action buttons. Takes no props of its own. Accepts all standarddiv attributes, including className.
DrawerHeader
A semantic header area for the drawer, typically containing a title and description. Renders a built-in close button by default.string
default:"Close drawer"
Accessible label for the close button.
boolean
default:"true"
Whether to show a built-in close (X) button.
DrawerOverlay
A translucent backdrop rendered behind the drawer content. Clicking the overlay closes the drawer by default.boolean
DrawerTitle
An accessible title for the drawer. Required for screen readers.boolean
DrawerTrigger
The element that opens the drawer when clicked. On touch / pen, a press-and-release that crosses a small movement threshold is treated as a drag and the resulting synthetic click is suppressed — defends against Android Chrome opening the drawer on a scroll-drag-end.boolean
Exported types
Also exported from@fanvue/ui: DrawerCloseProps, DrawerContentProps, DrawerDescriptionProps, DrawerFooterProps, DrawerHeaderProps, DrawerOverlayProps, DrawerPosition, DrawerProps, DrawerSize, DrawerTitleProps, DrawerTriggerProps, DrawerVariant.
Setup: Installation · Theming