Skip to content

@drawerly/react / ReactDrawerOptions

ReactDrawerOptions ​

Drawer options for the React adapter.

Extends ​

Properties ​

ariaDescribedBy? ​

ts
optional ariaDescribedBy: string;

ARIA describedby id for the drawer panel.

Inherited from ​

DrawerOptions.ariaDescribedBy


ariaLabel? ​

ts
optional ariaLabel: string;

ARIA label for the drawer panel.

Inherited from ​

DrawerOptions.ariaLabel


ariaLabelledBy? ​

ts
optional ariaLabelledBy: string;

ARIA labelledby id for the drawer panel.

Inherited from ​

DrawerOptions.ariaLabelledBy


closeOnBackdropClick? ​

ts
optional closeOnBackdropClick: DrawerPredicate<ReactDrawerOptions>;

Whether clicking the backdrop closes the drawer.

Default Value ​

ts
true

Inherited from ​

DrawerOptions.closeOnBackdropClick


closeOnEscapeKey? ​

ts
optional closeOnEscapeKey: DrawerPredicate<ReactDrawerOptions>;

Whether pressing Escape closes the drawer.

Default Value ​

ts
true

Inherited from ​

DrawerOptions.closeOnEscapeKey


component? ​

ts
optional component: ComponentType<any>;

Component rendered inside the drawer panel.


componentProps? ​

ts
optional componentProps: Record<string, unknown>;

Props passed to the rendered component.


dataAttributes? ​

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

Extra data attributes applied to the overlay element.

Inherited from ​

DrawerOptions.dataAttributes


drawerKey ​

ts
drawerKey: string;

Unique key identifying the drawer instance.

Inherited from ​

DrawerOptions.drawerKey


placement? ​

ts
optional placement: DrawerPlacement;

Drawer placement.

Default Value ​

ts
'right'

Inherited from ​

DrawerOptions.placement

Released under the MIT License.