<Drawer
open={true}
onClose={() => setIsOpen(false)}
disableCloseOnClickOutside={false}
disableCloseOnEscape={false}
size="medium"
onCloseAnimationComplete={() => {}}
onCloseAnimationStart={() => {}}
onOpenAnimationComplete={() => {}}
onOpenAnimationStart={() => {}}
>
<Drawer.Header>Header</Drawer.Header>
<Drawer.Content>Content</Drawer.Content>
<Drawer.Footer>
<Button>Action</Button>
</Drawer.Footer>
</Drawer>
Drawer Props
In addition to the props listed below, the Drawer component can accept any valid HTML dialog props.disableCloseOnClickOutside
When true, clicking outside the drawer will not close it.
When true, pressing the escape key will not close the drawer.
Enables scroll chaining behavior.
initialFocusResolver
(focusables: (HTMLElement | SVGElement)[]) => (HTMLElement | SVGElement)
Given an array of focusable elements, returns the element that should receive initial focus.
Callback when clicking outside the drawer.
Indicates the user has closed the drawer. Use this to update your state.
Callback indicating the drawer has animated out. Use this to clean up views as needed.
Callback indicating the drawer is beginning to animate out.
Callback indicating the drawer has animated in.
Callback indicating the drawer is beginning to animate in.
size
"small" | "medium" | "large" | "xlarge"
default:"medium"
<Drawer.Content sticky>Drawer content</Drawer.Content>
Drawer.Content Props
In addition to the props listed below, the Drawer.Content component can accept any valid HTML div props.When true, the content will stick below the header during scroll.