Bundleware, Toolbar Script Reference

Last site update 30th October 2026

store

FunctionAPI 2

State shared by this toolbar's row, widgets and windows on this page; create stores at the top level of the script. Values last until the toolbar is hidden or the page reloads, unless the store persists.

Signaturestore<T>(initial: T | (() => T), options?: { /** * Keeps the value across pages, tabs and restarts under this name, for this toolbar only: lowercase kebab-case, at * most 40 characters, such as 'settings'. The value is JSON data of at most 8 KiB; a toolbar keeps at most 16 such * stores and 32 KiB in all. A kept value replaces `initial`. Bundleware 0.4 and later. */ persist?: string; }): Store<T>
Take it fromconst { store } = Bundleware;

Parameters

ParameterTypeDescription
initialT | (() => T)
options{ /** * Keeps the value across pages, tabs and restarts under this name, for this toolbar only: lowercase kebab-case, at * most 40 characters, such as 'settings'. The value is JSON data of at most 8 KiB; a toolbar keeps at most 16 such * stores and 32 KiB in all. A kept value replaces `initial`. Bundleware 0.4 and later. */ persist?: string; }Optional.
options.persiststringOptional. Keeps the value across pages, tabs and restarts under this name, for this toolbar only: lowercase kebab-case, at most 40 characters, such as 'settings'. The value is JSON data of at most 8 KiB; a toolbar keeps at most 16 such stores and 32 KiB in all. A kept value replaces initial. Bundleware 0.4 and later.

Return Value

MemberTypeDescription
get()T
set(next)voidReplaces the value, or computes it from the previous one, and re-renders every component using it. A store that persists throws for a value that is not JSON data or goes over its limits, and keeps the value it had.
subscribe(listener)DisposeCalls listener after each change.

Availability

Applicable versionsAPI 2 and higher
Bundleware0.3.0, build 2026.10.30