Lui.TabControl
A tab strip with a memoized active body. Tabs are LuiTab(id, label, content, memoDependencies).
The active tab is controlled via an id and a select callback.
var tabs = new[]
{
new LuiTab("overview", "Overview", () => OverviewBody(), progress.Value),
new LuiTab("settings", "Settings", () => SettingsBody())
};
Lui.TabControl(tabs, activeTab.Value, id => activeTab.Value = id, "max-w-[900px]")The active body is wrapped in a memo keyed by the tab id plus the tab’s memoDependencies, so it
only rebuilds when that tab’s state changes.
Last updated on