Skip to content

@drawerly/react / UseDrawerResult

UseDrawerResult<TDrawerOptions>

Returned by useDrawer.

Type Parameters

TDrawerOptions

TDrawerOptions extends ReactDrawerOptions = ReactDrawerOptions

Properties

bringToTop()

ts
bringToTop: () => void;

Moves the drawer to the top of the stack.

Returns

void


close()

ts
close: () => void;

Closes the drawer.

Returns

void


instance

ts
instance: TDrawerOptions | undefined;

The drawer instance, or undefined while closed.


isOpen

ts
isOpen: boolean;

Whether the drawer is in the stack.


isTop

ts
isTop: boolean;

Whether the drawer is the topmost one in the stack.


updateOptions()

ts
updateOptions: (patch) => void;

Merges a patch into the drawer's options.

Parameters

patch

DrawerPatch<TDrawerOptions>

Returns

void

Released under the MIT License.