Skip to content

API Reference ​

Interfaces ​

InterfaceDescription
DrawerContentPropsProp injected into every component rendered inside a drawer panel.
DrawerlyContainerPropsProps accepted by DrawerlyContainer.
DrawerlyOptionsConfiguration options for createDrawerly.
DrawerManagerPublic API for managing a stack of drawers.
DrawerManagerConfigConfiguration accepted by createDrawerManager.
DrawerOptionsShared options for all drawers.
DrawerStateDrawer manager state.
ReactDrawerOptionsDrawer options for the React adapter.
UseDrawerlyResultReturned by useDrawerly.
UseDrawerResultReturned by useDrawer.

Type Aliases ​

Type AliasDescription
DrawerDefaultOptionsDefault options applied to new drawers.
DrawerInstanceConcrete drawer instance (full options including drawerKey).
DrawerKeyKey used to identify a drawer instance.
DrawerListenerListener called whenever the drawer state changes.
DrawerlyDrawerly instance created by createDrawerly.
DrawerOptionsWithoutKeyDrawer options without the drawerKey field.
DrawerPatchPartial set of options merged into a drawer.
DrawerPlacementPlacement of a drawer relative to the viewport.
DrawerPredicatePredicate used for drawer behaviors.
UnsubscribeFunction that unsubscribes a state listener.

Variables ​

VariableDescription
BASE_DRAWER_DEFAULTSBuilt-in defaults applied to every drawer manager.

Functions ​

FunctionDescription
createDrawerlyCreates a Drawerly instance.
createDrawerManagerCreates a new drawer manager backed by an in-memory stack.
DrawerlyContainerRenders and animates the active drawer stack through a portal.
resolveDrawerPredicateResolves a DrawerPredicate against a drawer instance.
useDrawerBinds to the drawer with the given key.
useDrawerlySubscribes to a Drawerly instance and returns its manager API together with the drawer stack.

Released under the MIT License.