Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Tabs

Preview

Pill
High-level summary.
Overflow
Segment
Icon on selected
Underline

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/tabs

Import the shared styles once in your application.

TSUsage
import Tabs from '@/components/beui/Tabs.vue'
import '@/components/beui/styles.css'

API Reference

Tabs

defaultValue?
string
Default—
v-model?
string

The selected tab's value. Leave it unbound for an uncontrolled `Tabs` that starts at `defaultValue`.

Default—
@value-change?
(value: string) => void
Default—
variant?
"pill" | "underline" | "segment"
Defaultpill
icons?
"always" | "selected"

With "selected", a trigger's icon springs open only on the selected tab and folds away when another is chosen. Defaults to "always".

Defaultalways
labels?
Partial<TabsMessages> & { list?: string }

Override any built-in string. `list` names the tab list for assistive technology.

Default—
class?
string
Default—
items?
readonly TabItem[]

Shorthand for a list of triggers and their panels. Omit it and compose `TabsList`, `TabsTrigger` and `TabsContent` instead.

Default—
#default?
slot

`TabsList` and `TabsContent`, or nothing when `items` is set.

Default—
#trigger?
slot

Content of a trigger in `items` mode. Defaults to the item's label.

Default—
#icon?
slot

Icon of a trigger in `items` mode.

Default—
#panel?
slot

Content of a panel in `items` mode. Defaults to the item's `content`.

Default—

TabsList

class?
string
Default—
wrapperClassName?
string

Class of the outer frame; `class` itself lands on the tab list.

Default—
#default?
slot
Default—

TabsTrigger

class?
string
Default—
value
string
Default—
disabled?
boolean
Default—
indicatorClassName?
string

Class of the sliding indicator while this tab is selected.

Default—
#icon?
slot

An icon before the label, such as an SVG element.

Default—
#default?
slot

Label of the tab.

Default—

TabsContent

value
string
Default—
class?
string
Default—
#default?
slot
Default—
Also on React Native. Pill, segment and underline with a gliding indicator.(opens in a new tab)

Used in these Pro blocks

Updated