ImGui.mount(options)mounts the UI root inside an isolated Shadow DOM host.ImGui.frame(fn)registers and renders the main frame callback.ImGui.invalidate()schedules a render of the registered frame callback.ImGui.begin(name, options?, fn?)begins a window. Whenfnis provided,end()is called automatically.ImGui.end()ends the current window context (needed only whenbeginis used without callback form).
x,y,width,height: initial or updated window geometry.collapsed: collapsed/expanded state.open: can be:booleanfor direct control.{ value: boolean }model for two-way binding with titlebar close (x) button.
text(value)separator()sameLine()columns(count)spacing(px?)indent(px?)unindent(px?)
button(label): booleancheckbox(label, model): booleanradio(label, model, value): booleaninputText(label, model, opts?): stringsliderFloat(label, model, min, max, opts?): numbersliderInt(label, model, min, max, opts?): numberdragFloat(label, model, speed?, min?, max?): numberdragInt(label, model, speed?, min?, max?): numbercombo(label, model, options): stringcolorPicker(label, model): stringlink(label, href, opts?): booleanopts.text: label text override.opts.newTab(defaulttrue): open in new tab.
menuBar(items): string | nullcontextMenu(label, items): string | nulltooltip(text): void
collapsingHeader(label, opts?, fn?): booleantreeNode(label, fn?): booleanbeginTabs(name): booleantabItem(name, label, fn?): boolean
progressBar(fraction, size?): voidplotLines(label, values, opts?): voidplotHistogram(label, values, opts?): void
theme.set(themeNameOrVars, vars?)- Theme names:
dark,light,contrast. - You can also set CSS variables directly.
- Theme names:
use(pluginFn)registerWidget(name, fn)
Most interactive controls use mutable models:
{ value: boolean }{ value: number }{ value: string }
This keeps control values stable between renders and enables change-driven updates.