Skip to main content
Version: Next

Drawer API

import { Drawer } from '@editora/ui-react';

Props​

PropTypeDescription
ariaDescribedBystring
ariaLabelstring
ariaLabelledBystring
closeOnEscboolean
closeOnOverlayboolean
density'default' | 'compact' | 'comfortable'
descriptionstring
dismissibleboolean
elevation'default' | 'none' | 'low' | 'high'
initialFocusstring
insetboolean
lockWhileLoadingboolean
onChange(open: boolean) => void
onClose() => void
onOpen() => void
openboolean
shape'default' | 'square' | 'soft'
showCloseboolean
side'left' | 'right' | 'top' | 'bottom' | 'start' | 'end'
size'default' | 'sm' | 'lg'
state'idle' | 'loading' | 'error' | 'success'
titlestring
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