Skip to content

Tabs

Switch between peer panels while coordinating focus and activation.

Usage

Manual

Move focus between tabs without activating a panel until selection is confirmed.

Panels stay mounted. Arrow keys either activate immediately or wait for Enter and Space.

Overview

Release health and deployment summary.

Automatic

Advance automatically while still exposing pause and direct navigation controls.

Panels stay mounted. Arrow keys either activate immediately or wait for Enter and Space.

Overview

Release health and deployment summary.

Vertical disabled

Move vertically through actions while skipping an unavailable item.

Panels stay mounted. Arrow keys either activate immediately or wait for Enter and Space.

Overview

Release health and deployment summary.

API

Vue package: @sectile/vue/tabs

Components
  • TabsRoot
  • TabsList
  • TabsTrigger
  • TabsContent
  • TabsIndicator

Props

TabsRootProps

activationMode

Whether focus activates a tab automatically or waits for explicit confirmation.

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

defaultValue

Initial value used when the component owns its state.

disabled

Whether interaction is unavailable.

disabledItems

Item values excluded from focus and selection.

items

Ordered item values managed by the component.

modelValue

Current value when state is controlled by the parent.

orientation

Axis used for layout and keyboard movement.

readonly

Whether the value can be inspected but not changed.

TabsListProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

label

Accessible name announced for the control.

TabsTriggerProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

disabled

Whether interaction is unavailable.

value

Current value exposed by this contract.

TabsContentProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

value

Current value exposed by this contract.

TabsIndicatorProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

Slots

TabsRootSlotProps

disabled

Whether interaction is unavailable.

highlightedValue

Value currently highlighted for interaction.

readonly

Whether the value can be inspected but not changed.

value

Current value exposed by this contract.

TabsTriggerSlotProps

disabled

Whether interaction is unavailable.

highlighted

Whether this item is highlighted for interaction.

selected

Whether this item is selected.

value

Current value exposed by this contract.

TabsContentSlotProps

selected

Whether this item is selected.

value

Current value exposed by this contract.

Events

TabsRoot

activate

Emitted when an item becomes active.

highlight

Emitted when the highlighted item changes.

update:modelValue

Emitted when the component requests a new controlled value.

Other types

TabsActivationMode

ts
type TabsActivationMode = 'automatic' | 'manual'

TabsValueChangeHandler

ts
type TabsValueChangeHandler = (value: string) => void

TabsHighlightHandler

ts
type TabsHighlightHandler = (value: string | null) => void

TabsActivateHandler

ts
type TabsActivateHandler = (value: string) => void

Parts

Shared scope: [data-scope="tabs"]. Combine it with a part selector to keep styles local to this component.

PartSelectorRoleExtra attributes
root[data-part="root"]Defines the component boundary and owns its composed parts.
list[data-part="list"]Groups the component items in navigation order.
trigger[data-part="trigger"]Opens, closes, or activates the associated content.
indicator[data-part="indicator"]Shows state or position without replacing the primary content.
content[data-part="content"]Contains the component content shown for the active state.

Keyboard interaction

KeyBehavior
Arrow Left / Arrow RightMove between tabs in a horizontal list.
Arrow Up / Arrow DownMove between tabs in a vertical list.
Home / EndMove to the first or last tab.
Enter / SpaceActivate the focused tab in manual activation mode.

Accessibility

The tab list connects every tab to one tab panel and preserves selected, disabled, and orientation state.

See the corresponding WAI-ARIA pattern for the host accessibility contract.

Released under the MIT License.