API reference: @salmonui/overlays/drawer
DrawerPropsinterface
import type { DrawerProps } from '@salmonui/overlays/drawer';interface DrawerProps extends Omit<DialogProps, 'placement' | 'position' | 'defaultPosition' | 'onPositionChange' | 'draggable' | 'dragHandle' | 'onMoveStart' | 'onMove' | 'onMoveEnd' | 'resizable' | 'onResizeStart' | 'onResize' | 'onResizeEnd' | 'fullScreen'> {
readonly side?: 'start' | 'end' | 'top' | 'bottom' | undefined;
readonly size?: number | string | undefined;
}
| Name | Signature | Description |
|---|---|---|
sideoptional | readonly side?: 'start' | 'end' | 'top' | 'bottom' | undefined; | Edge the panel slides from: logical |
sizeoptional | readonly size?: number | string | undefined; | Inline size (start / end) or block size (top / bottom), number px or CSS length. Default 320 px. |
childrenoptionalinherited | children?: ReactNode; | Content parts: |
triggeroptionalinherited | trigger?: ReactNode; | Rendered before the dialog with the dialog's context: usually a |
openoptionalinherited | open?: boolean; | |
defaultOpenoptionalinherited | defaultOpen?: boolean; | |
onOpenChangeoptionalinherited | onOpenChange?: ((open: boolean, event: DialogOpenChangeEvent) => void); | |
onAfterOpenoptionalinherited | onAfterOpen?: (() => void); | |
onAfterCloseoptionalinherited | onAfterClose?: (() => void); | |
modaloptionalinherited | modal?: boolean; | showModal() (default) or show() (modeless: no backdrop, no focus containment). |
dismissibleoptionalinherited | dismissible?: boolean | { readonly escape?: boolean | undefined; readonly outside?: boolean | undefined; }; | Escape and backdrop dismissal. |
onOverlayPressoptionalinherited | onOverlayPress?: ((event: PointerEvent) => void); | Press on the backdrop of a modal dialog. |
closeButtonoptionalinherited | closeButton?: boolean; | A close button in the corner (label |
titleoptionalinherited | title?: ReactNode; | Shorthand for a |
initialFocusoptionalinherited | initialFocus?: false | RefObject<HTMLElement | null>; | Element focused on open (else |
returnFocusoptionalinherited | returnFocus?: boolean; | Return focus to the invoker on close. Default true. |
containeroptionalinherited | container?: Element | null; | Modeless only: render the dialog inside this element (positioned in it) instead of in place. Mounted after hydration. |
keepMountedoptionalinherited | keepMounted?: boolean; | Render the closed |
widthoptionalinherited | width?: string | number; | |
heightoptionalinherited | height?: string | number; | |
minHeightoptionalinherited | minHeight?: string | number; | |
localeTextoptionalinherited | localeText?: DialogLocaleText; | |
classNamesoptionalinherited | classNames?: Partial<Record<"closeButton", string>>; | |
stylesoptionalinherited | styles?: Partial<Record<"closeButton", CSSProperties>>; | |
refoptionalinherited | ref?: Ref<HTMLDialogElement>; | The |