Bundleware, Toolbar Script Reference

Last site update 30th October 2026

useToolbar

HookAPI 2

This mount's context: timers, listeners, windows, popups, page and local AI.

SignatureuseToolbar(): Context
Take it fromconst { useToolbar } = Bundleware;

Return Value

MemberTypeDescription
idstringThis toolbar's @id.
signalAbortSignalAborted when this mount ends.
onCleanup(dispose)Dispose
timeout(callback, ms)Dispose
interval(callback, ms)DisposeMinimum interval 16 ms.
listen(target, type, listener, options?)Dispose
openWindow(target, options)WindowHandleOpens target, such as <Details />, in a window. Opening the same component again replaces its window, and a window that hangs from the bar replaces the toolbar's other hanging window. Escape, pressing its part again, props.close() and hiding the toolbar close it.
showPopup(spec)voidShows one of the host's canned period dialogs.
pagePageSource
activitySource<readonly ActivityEvent[]>Up to twelve newest-first visits, route changes and AI-link clicks in this document.
aiSiteSource<AiSiteSnapshot>The AI chat website open in this tab, if any, and the prompt being typed.
speech(onChange?)SpeechSpeaks with a local English voice; speech stops when this mount ends.
sound(onChange?)SoundA deck of this toolbar's own music, made with Web Audio; it stops when this mount ends. Call play from an action: browsers start sound only after a click.
levels(count?, options?)readonly number[]count levels (default 7), 0–1, of everything this toolbar is playing, from bass to treble.
generate(request)Promise<GenerationResult>Optional parody generation with Chrome's local model, or your fallback text.
openLocalAiSetup()voidOpens Bundleware's local model preparation page.

Availability

Applicable versionsAPI 2 and higher
Bundleware0.3.0, build 2026.10.30