open | boolean | No | — | Controlled open state. Pair with onOpenChange. |
|---|
defaultOpen | boolean | No | — | Initial open state when open is omitted. |
|---|
onOpenChange | ((open: boolean) => void) | No | — | Called when opening or closing is requested. |
|---|
trigger | ReactElement | Yes | — | One ref-capable action element used as the drawer trigger. |
|---|
title | string | Yes | — | Accessible dialog title, rendered in the header. |
|---|
description | string | No | — | Optional accessible description rendered below the heading. |
|---|
closeLabel | string | Yes | — | Accessible name for the built-in close action. |
|---|
side | "left" | "right" | "bottom" | No | "right" | Screen edge from which the drawer opens. |
|---|
headerActions | ReactNode | No | — | Additional actions placed beside the built-in close button. |
|---|
headerContent | ReactNode | No | — | Additional header content beneath the title/action row. |
|---|
bodyClassName | string | No | "" | Classes applied to the scrollable drawer-body wrapper. |
|---|
footer | ReactNode | No | — | Optional footer rendered after the body. |
|---|
children | ReactNode | No | — | Content rendered inside the component. |
|---|
forceMount | true | No | — | Keep the Radix content mounted for externally managed visibility or animation. The consumer must manage its closed presentation. |
|---|
onEscapeKeyDown | ((event: KeyboardEvent) => void) | No | — | Called before Escape dismisses the surface; prevent default to keep it open. |
|---|
onPointerDownOutside | ((event: CustomEvent<{ originalEvent: PointerEvent; }>) => void) | No | — | Called for a pointer press outside the content; prevent default to cancel dismissal. |
|---|
onFocusOutside | ((event: CustomEvent<{ originalEvent: FocusEvent; }>) => void) | No | — | Called when focus moves outside the content; prevent default to cancel the associated outside interaction. |
|---|
onInteractOutside | ((event: CustomEvent<{ originalEvent: PointerEvent; }> | CustomEvent<{ originalEvent: FocusEvent; }>) => void) | No | — | Called for pointer or focus interaction outside the content; prevent default to cancel dismissal. |
|---|
onOpenAutoFocus | ((event: Event) => void) | No | — | Called before focus enters opened content; prevent default to choose the focus target. |
|---|
onCloseAutoFocus | ((event: Event) => void) | No | — | Called before focus returns after closing; prevent default when navigation manages focus. |
|---|
className | string | No | "" | Additional classes applied to the component’s documented root or control. |
|---|
id | string | No | — | DOM identifier for the rendered element. |
|---|
ref | Ref<HTMLDivElement> | No | — | Ref to the component’s documented DOM element. |
|---|