Drawer
A panel that slides in from the edge of the screen.
Usage guidelines
- Drawer extends Dialog: It adds gestures, snap points and indent effects. If you don't need these, use Dialog instead. A panel that slides in from the edge of the screen and doesn't need gestures is a positioned Dialog.
Anatomy
Import the primitives and assemble the parts:
@using Blazix.Primitives
<DrawerProvider>
<DrawerIndentBackground />
<DrawerIndent>
<DrawerRoot>
<DrawerTrigger />
<DrawerSwipeArea />
<DrawerPortal>
<DrawerBackdrop />
<DrawerViewport>
<DrawerPopup>
<DrawerContent>
<DrawerTitle />
<DrawerDescription />
<DrawerClose />
</DrawerContent>
</DrawerPopup>
</DrawerViewport>
</DrawerPortal>
</DrawerRoot>
</DrawerIndent>
</DrawerProvider>API Reference
DrawerRoot
Doesn't render its own HTML element.
DrawerProvider
Doesn't render its own HTML element.
DrawerTrigger
Renders a <button> element.
Other attributes are passed to the element it renders.
DrawerPortal
Doesn't render its own HTML element.
DrawerBackdrop
Renders a <div> element.
Other attributes are passed to the element it renders.
DrawerPopup
Renders a <div> element.
Other attributes are passed to the element it renders.
DrawerContent
Renders a <div> element.
Other attributes are passed to the element it renders.
DrawerTitle
Renders a <h2> element.
Other attributes are passed to the element it renders.
DrawerDescription
Renders a <p> element.
Other attributes are passed to the element it renders.
DrawerClose
Renders a <button> element.
Other attributes are passed to the element it renders.
DrawerViewport
Renders a <div> element.
Other attributes are passed to the element it renders.
DrawerHandle
DrawerIndent
Renders a <div> element.
Other attributes are passed to the element it renders.
DrawerIndentBackground
Renders a <div> element.
Other attributes are passed to the element it renders.
DrawerSwipeArea
Renders a <div> element.
Other attributes are passed to the element it renders.
DrawerVirtualKeyboardProvider
Doesn't render its own HTML element.