Drawer API
import { Drawer } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
ariaDescribedBy | string | |
ariaLabel | string | |
ariaLabelledBy | string | |
closeOnEsc | boolean | |
closeOnOverlay | boolean | |
density | 'default' | 'compact' | 'comfortable' | |
description | string | |
dismissible | boolean | |
elevation | 'default' | 'none' | 'low' | 'high' | |
initialFocus | string | |
inset | boolean | |
lockWhileLoading | boolean | |
onChange | (open: boolean) => void | |
onClose | () => void | |
onOpen | () => void | |
open | boolean | |
shape | 'default' | 'square' | 'soft' | |
showClose | boolean | |
side | 'left' | 'right' | 'top' | 'bottom' | 'start' | 'end' | |
size | 'default' | 'sm' | 'lg' | |
state | 'idle' | 'loading' | 'error' | 'success' | |
title | string | |
tone | 'default' | 'brand' | 'danger' | 'success' | 'warning' | |
variant | 'default' | 'solid' | 'flat' | 'line' | 'glass' | 'contrast' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Drawer.Header props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Drawer.Footer props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-drawer>
Drawer renders the ui-drawer custom element from @editora/ui-core, which can also be used without React.
Attributes: aria-describedby, aria-label, aria-labelledby, close-on-esc, close-on-overlay, density, description, dismissible, elevation, headless, initial-focus, inset, lock-while-loading, open, shape, show-close, side, size, state, title, tone, variant
Events: change, close, hide, open, request-close, show, ui-request-close