Tabs
Segmented control or line variant; arrow-key navigation.
ui navigation
Preview
Installation
npx slintcn@latest add tabsUsage
import { Tabs, TabsVariant } from "slintcn/components/tabs.slint";
Tabs {
items: [{ label: "Account" }, { label: "Password" }];
current <=> tab;
}
if tab == 0: /* Account content */
Properties
items
in
[TabItem]
Tab definitions in display order.
current
in-out
int
Two-way; index of the active tab.
variant
in
TabsVariant
Style — `default` (segmented) or `line` (underlined).
changed
callback
(int)
Fired with the new `current` index.
API
TabsVariantdefaultlineAccessibility
focusableyeskeyboardArrow keysDependencies
theme only
Installed automatically as transitive dependencies of slintcn add tabs.