Tabs
Tabs renders a controlled tab list.
Declare tab items
Section titled “Declare tab items”Tabs( { TabItem("Overview"), TabItem(app::images::activity, "Activity"), std::move(TabItem("Reports")).Enabled(false), }, selected).OnChanged([selected](std::size_t index) { selected = index;})Simple constructors accept string labels.
TabItem adds raster or vector icons, icon-only presentation with a required semantic label, and per-item enabled state.
Control the active page
Section titled “Control the active page”The selected index is controlled and must identify an item.
OnChanged requests a new index; use that state to choose the corresponding page content.
Column { Tabs({"Files", "Search", "History"}, selected) .OnChanged([selected](std::size_t index) { selected = index; }), selected == 0 ? FilesPage() : selected == 1 ? SearchPage() : HistoryPage(),}Theme and accessibility
Section titled “Theme and accessibility”TabsStyle controls label states, icons, item geometry, optional equal expansion, divider, indicator color and sizing, and indicator motion.
TabIndicatorSizing::Item follows the item; Content can produce a shorter content-width indicator.
Tabs expose tab-list, tab, selected, disabled, focus, and activation semantics.
- Constructors: label lists or
std::vector<TabItem>, followed by index orState<std::size_t>. TabItem: label, icon plus label,IconOnly, and.Enabled(bool).- Event:
.OnChanged(function)withstd::size_t. - Theme style:
TabsStyleandTabIndicatorSizing.

