Tabs
Windows Tabs
Tabs
Windows Tabs
Basic Usage
Tabs
Demo will load when visible.
Indicator Showcase
Indicator variants & motions
Demo will load when visible.
Dynamic Content Size (manual, rich content)
Dynamic Content (manual)
Demo will load when visible.
Layout Direction (placement)
Placement + Header Slot
Demo will load when visible.
Height Follows Content (animation.size)
Auto Size (contentScrollable=false)
Demo will load when visible.
Closing Animations (indicator/content)
Disable Animations
Demo will load when visible.
API
TxTabs Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | - | Controlled active tab name. |
defaultValue | string | - | Initial active tab name when modelValue is not provided. |
placement | 'left' | 'right' | 'top' | 'bottom' | 'left' | Navigation placement; invalid values fall back to left. |
offset | number | 0 | Extra indicator offset along the active tab axis. |
navMinWidth | number | 220 | Minimum navigation width for vertical placements. |
navMaxWidth | number | 320 | Maximum navigation width for vertical placements. |
contentPadding | number | 12 | Padding applied to the main content panel. |
contentScrollable | boolean | true | Wrap content in an internal scroll container unless size animation needs direct measurement. |
borderless | boolean | false | Remove the outer border/background for embedded layouts. |
autoHeight | boolean | false | Animate content height changes through AutoSizer. |
autoWidth | boolean | false | Animate content width changes through AutoSizer. |
indicatorVariant | 'line' | 'pill' | 'block' | 'dot' | 'outline' | 'line' | Indicator style; invalid values fall back to line. |
indicatorMotion | 'stretch' | 'warp' | 'glide' | 'snap' | 'spring' | 'stretch' | Indicator transition motion class; invalid values fall back to stretch. |
indicatorMotionStrength | number | 1 | Non-negative CSS variable controlling indicator motion strength. |
animation | TabsAnimation | - | Per-area animation configuration for size, nav, indicator, and content transitions. |
animation.size | boolean | { enabled?; durationMs?; easing? } | - | Enable and configure AutoSizer size animation; defaults to autoHeightDurationMs / autoHeightEasing. |
animation.nav | boolean | { enabled?; durationMs?; easing? } | - | Enable and configure nav transition CSS variables. |
animation.indicator | boolean | { enabled?; durationMs?; easing? } | - | Enable and configure indicator transition CSS variables. |
animation.content | boolean | { enabled? } | - | Enable or disable the content zoom class during tab switches. |
autoHeightDurationMs | number | 250 | Default size animation duration. |
autoHeightEasing | string | ease | Default size animation easing. |
Slots
| Name | Params | Description |
|---|---|---|
default | - | Provide TxTabItem, optional TxTabItemGroup, and optional TxTabHeader nodes. |
nav-right | - | Render extra controls at the end of the nav bar. |
Expose
| Name | Type | Description |
|---|---|---|
refresh | () => void | Forward to the internal AutoSizer refresh(). |
flip | (action: () => void | Promise<void>) => Promise<void> | Run an action inside the internal AutoSizer FLIP transition when available. |
action | (fn: (el: HTMLElement) => void | Promise<void>, optionsOrDetect?: any) => Promise<any> | Forward to the internal AutoSizer action helper. |
size | () => { width: number; height: number } | undefined | Return the latest measured AutoSizer size. |
TxTabItem Props
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | - | Unique tab name used as the active value. |
iconClass | string | '' | Optional icon class rendered before the tab label. |
disabled | boolean | false | Block click/Enter activation and mark the tab disabled. |
activation | boolean | false | Mark this tab as the uncontrolled default when no modelValue or defaultValue is provided. |
Events
| Event | Params | Description |
|---|---|---|
change | string | Emitted after user activation or uncontrolled default activation changes the active tab. |
update:modelValue | string | Emitted with the active tab name for v-model updates. |