Skip to content

@drawerly/react / DrawerOptions

DrawerOptions

Shared options for all drawers.

Extended by

Properties

ariaDescribedBy?

ts
optional ariaDescribedBy: string;

ARIA describedby id for the drawer panel.


ariaLabel?

ts
optional ariaLabel: string;

ARIA label for the drawer panel.


ariaLabelledBy?

ts
optional ariaLabelledBy: string;

ARIA labelledby id for the drawer panel.


closeOnBackdropClick?

ts
optional closeOnBackdropClick: DrawerPredicate<DrawerOptions>;

Whether clicking the backdrop closes the drawer.

Default Value

ts
true

closeOnEscapeKey?

ts
optional closeOnEscapeKey: DrawerPredicate<DrawerOptions>;

Whether pressing Escape closes the drawer.

Default Value

ts
true

dataAttributes?

ts
optional dataAttributes: Record<`data-${string}`, string | number | boolean | null | undefined>;

Extra data attributes applied to the overlay element.


drawerKey

ts
drawerKey: string;

Unique key identifying the drawer instance.


placement?

ts
optional placement: DrawerPlacement;

Drawer placement.

Default Value

ts
'right'

Released under the MIT License.