Skip to content

@drawerly/vue / Drawerly

Drawerly<TDrawerOptions> ​

Drawerly instance created by createDrawerly.

Extends ​

Type Parameters ​

TDrawerOptions ​

TDrawerOptions extends VueDrawerOptions = VueDrawerOptions

Properties ​

bringToTop() ​

ts
bringToTop: (key) => void;

Moves the drawer with the given key to the top of the stack.

Parameters ​

key ​

string

Returns ​

void

Inherited from ​

DrawerManager.bringToTop


close() ​

ts
close: (key?) => void;

Closes the top drawer or the drawer with the given key.

Parameters ​

key? ​

string

Returns ​

void

Inherited from ​

DrawerManager.close


closeAll() ​

ts
closeAll: () => void;

Closes all drawers.

Returns ​

void

Inherited from ​

DrawerManager.closeAll


getDefaultOptions() ​

ts
getDefaultOptions: () => DrawerDefaultOptions<TDrawerOptions>;

Returns the current global default options.

Returns ​

DrawerDefaultOptions<TDrawerOptions>

Inherited from ​

DrawerManager.getDefaultOptions


getDrawerInstance() ​

ts
getDrawerInstance: (key) => TDrawerOptions | undefined;

Returns a drawer instance by key, if it exists.

Parameters ​

key ​

string

Returns ​

TDrawerOptions | undefined

Inherited from ​

DrawerManager.getDrawerInstance


getState() ​

ts
getState: () => DrawerState<TDrawerOptions>;

Returns the current drawer state.

Returns ​

DrawerState<TDrawerOptions>

Inherited from ​

DrawerManager.getState


getTopDrawer() ​

ts
getTopDrawer: () => TDrawerOptions | undefined;

Returns the topmost drawer instance, if any.

Returns ​

TDrawerOptions | undefined

Inherited from ​

DrawerManager.getTopDrawer


install() ​

ts
install: (app) => void;

Installs the instance into a Vue application.

Parameters ​

app ​

App

Returns ​

void


isOpen() ​

ts
isOpen: (key) => boolean;

Returns whether a drawer with the given key is in the stack.

Parameters ​

key ​

string

Returns ​

boolean

Inherited from ​

DrawerManager.isOpen


open() ​

ts
open: (options) => string;

Opens a drawer at the top of the stack. Options of an already open drawer are replaced.

Parameters ​

options ​

TDrawerOptions

Returns ​

string

Inherited from ​

DrawerManager.open


state ​

ts
state: Readonly<ShallowRef<DrawerState<TDrawerOptions>>>;

Reactive drawer state.


subscribe() ​

ts
subscribe: (listener) => Unsubscribe;

Subscribes to state changes.

Parameters ​

listener ​

DrawerListener<TDrawerOptions>

Returns ​

Unsubscribe

Inherited from ​

DrawerManager.subscribe


updateDefaultOptions() ​

ts
updateDefaultOptions: (patch) => void;

Merges a patch into the global default options used for future drawers.

Parameters ​

patch ​

DrawerDefaultOptions<TDrawerOptions>

Returns ​

void

Inherited from ​

DrawerManager.updateDefaultOptions


updateOptions() ​

ts
updateOptions: (key, patch) => void;

Merges a patch into the options of an existing drawer.

Parameters ​

key ​

string

patch ​

DrawerPatch<TDrawerOptions>

Returns ​

void

Inherited from ​

DrawerManager.updateOptions

Released under the MIT License.