@wix/design-system
Version:
@wix/design-system
57 lines (54 loc) • 3.07 kB
Markdown
- type: string
- description: applied as data-hook HTML attribute that can be used to create driver in testing
- type: boolean
- description: when false - items should not be rendered in the DOM.
- type: ReactNode
- description: the content of the drawer
- type: boolean
- description: shows handle and enables expand/collapse functionality
- default: true
- type: (string | number)[]
- description: the snap points of the drawer
- default: [1]
- type: boolean
- description: whether the drawer should be dismissible by clicking outside of it
- default: true
- type: boolean
- description: only controls the color of the backdrop. Meaning if the backdrop=false, the overlay is still present preventing clicks on the content behind the backdrop, just invisible.
- default: true
- type: boolean
- description: controls whether the backdrop overlay is rendered at all. When false, the overlay element is not rendered in the DOM.
- default: true
- type: boolean
- description: the margin around the Drawer content box (spacing between box and screen)
- default: true
### onClose
- type: (open: boolean) => void
- description: fires when (1) overlay is clicked (outside click) and (2) when is in collapsed position and being dragged towards the anchor side and (3) Esc key press.
### ariaLabelledBy
- type: string
- description: a11y: Sets the aria-labelledby attribute on the drawer content
### role
- type: "none" | string & {} | "status" | "button" | "article" | "dialog" | "figure" | "form" | "img" | "link" | "main" | "menu" | "option" | "search" | "table" | "alert" | "alertdialog" | "application" | "banner" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "directory" | "document" | "feed" | "grid" | "gridcell" | "group" | "heading" | "list" | "listbox" | "listitem" | "log" | "marquee" | "math" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "note" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "switch" | "tab" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem"
- description: wai-aria role
- type: string & {} | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | number & {}
- description: z-index of the drawer
- default: 1000
- type: boolean
- description: Whether the drawer content should be wrapped in a scrollable container, by default it is true. If false, the drawer content will be rendered as is, without any scrollable container.
- default: true
- type: boolean
- description: When true, repositions the drawer upward when the on-screen keyboard appears on mobile, keeping inputs visible. When false, falls back to default browser scroll behavior.
- default: true