Skip to content

@drawerly/react / DrawerlyContainerProps

DrawerlyContainerProps<TDrawerOptions> ​

Props accepted by DrawerlyContainer.

Type Parameters ​

TDrawerOptions ​

TDrawerOptions extends ReactDrawerOptions = ReactDrawerOptions

Properties ​

children()? ​

ts
optional children: (props) => ReactNode;

Renders the panel content of drawers that do not specify a component.

Parameters ​

props ​
close ​

() => void

drawer ​

TDrawerOptions

Returns ​

ReactNode


drawerly ​

ts
drawerly: Drawerly<TDrawerOptions>;

Drawerly instance whose stack this container renders.


lockScroll? ​

ts
optional lockScroll: boolean;

Locks body scroll while a modal drawer is on screen.

Default Value ​

ts
true

ts
optional modal: boolean;

Renders drawers as modal dialogs: backdrop, body scroll locking and aria-modal.

Default Value ​

ts
true

onAllClosed()? ​

ts
optional onAllClosed: () => void;

Called when the last drawer has finished closing.

Returns ​

void


onDrawerClosed()? ​

ts
optional onDrawerClosed: (payload) => void;

Called when a drawer finishes closing.

Parameters ​

payload ​
key ​

string

Returns ​

void


onDrawerOpened()? ​

ts
optional onDrawerOpened: (payload) => void;

Called when a drawer finishes opening.

Parameters ​

payload ​
key ​

string

Returns ​

void


portalTo? ​

ts
optional portalTo: string;

Portal target selector for the drawer stack.

Default Value ​

ts
'body'

Released under the MIT License.