TabBar
Bottom tab navigation with icons, badges, and safe-area support.
TabBar
TxTabBar renders app-style bottom navigation. It manages a v-model value, exposes tab semantics for each item, supports badges, and can reserve the device safe-area inset when it is fixed to the viewport bottom.
Basic Usage
TabBar
Demo will load when visible.
API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | number | '' | Active tab value used by v-model. |
items | TabBarItem[] | [] | Tabs rendered from left to right. |
fixed | boolean | true | Fixes the bar to the bottom of the viewport. Disable it when the bar lives inside a framed preview or custom layout. |
safeAreaBottom | boolean | true | Adds an env(safe-area-inset-bottom) spacer below the tab row. |
disabled | boolean | false | Disables all tab buttons and suppresses value updates. |
zIndex | number | 2000 | CSS z-index written to --tx-tab-bar-z-index. |
TabBarItem
| Field | Type | Description |
|---|---|---|
value | string | number | Value emitted when the tab is selected. |
label | string | Visible tab label. |
iconClass | string | Optional icon class rendered above the label. |
badge | string | number | Optional badge displayed on the icon area. Empty values are hidden. |
disabled | boolean | Disables only this tab item. |
Events
| Event | Params | Description |
|---|---|---|
update:modelValue | (value) | Emitted with the picked item value. |
change | (value) | Mirrors the picked value for change listeners. |