<tab-bar>
A Material tab bar with swipeable panes; each <tab> child is a label and its content.
<screen>
<app-bar title="Library"/>
<tab-bar label-color="teal-600"
indicator-color="teal-600">
<tab label="Books">
<column style="p-16 gap-8">
<text style="font-semibold">The Overstory</text>
<text style="muted">Richard Powers, 62% read</text>
</column>
</tab>
<tab label="Audiobooks">
<text style="p-16">2 audiobooks</text>
</tab>
<tab label="Podcasts">
<text style="p-16">5 shows</text>
</tab>
</tab-bar>
</screen>
Attributes
| Name | What it does | Default |
|---|---|---|
background-color |
Tab bar background. color |
|
expand |
No inner scroll: the tab content flows in the parent scroll. boolean |
false |
height |
Total height in px. Below the Material intrinsic (48, or 74 with icons) it sizes the bar strip itself; larger values size bar plus views. number |
|
indicator-color |
Tab indicator color. color |
|
label-color |
Active tab label color. color |
|
scrollable |
Scrollable tabs. boolean |
false |
unselected-label-color |
Inactive tab label color. color |
Readings
| Name | What it does |
|---|---|
index |
The selected item's position, from 0. |
label |
The selected item's label. |
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.