Tabs

Tabs is an SSR-ready family of tab components:

Danish fontina parmesan cheese on toast. Pepper jack chalk and cheese chalk and cheese goat cheese strings say cheese st. agur blue cheese brie. Macaroni cheese mascarpone cut the cheese halloumi ricotta camembert de normandie mascarpone mozzarella. Edam everyone loves camembert de normandie stinking bishop cottage cheese monterey jack cheesecake. Cheeseburger caerphilly hard cheese.

Boursin jarlsberg queso melted cheese manchego cheese and biscuits bocconcini mascarpone. Cheesy feet the big cheese parmesan mascarpone feta when the cheese comes out everybody's happy pecorino cheesecake. Monterey jack st. agur blue cheese stilton cheesy feet stinking bishop fromage frais smelly cheese.

Code Example
<TabsManager>
  <Tabs :tabs="['First', 'Second', 'Third']" />
  <TabContent name="First">
    First tab content
  </TabContent>
  <TabContent name="Second">
    Second tab content
  </TabContent>
  <TabContent name="Third">
    Third tab content
  </TabContent>
</TabsManager>

Components

The Tabs components include the following:

TabsManager

TabsManager handles the logic for displaying the current tab. It must wrap all other tab components. It supports the following props:

PropTypeDescription
tab
string
Sets the current tab. Can be used with v-model:tab

Tabs

Tabs shows the clickable tabs. Use the tabs prop to display text tabs. Alternatively, place Tab elements inside to create custom tabs.

Tabs can be customized with the following props:

PropTypeDescription
is
string
Allows changing the element tag.
tabs
Array<string>
An array of tab names. When used, tabs will be automatically created.
variant
string
Sets the variant style using one of the following prop names.
    bordered
boolean
Enables the bordered variant.
    lifted
boolean
Enables the lifted variant.
    boxed
boolean
Enables the boxed variant.
    inline-boxed
boolean
Enables the inline-boxed variant.
size
string
Sets the size. Can be set to one of the below size prop names.
    lg
boolean
Sets the size to lg
    md
boolean
Sets the size to md (the default)
    sm
boolean
Sets the size to sm
    xs
boolean
Sets the size to xs

Tab

Tab allows you to override the display of Tabs. Use Tab when you need something more than a string for the tab display. Tab can be customized using the following props:

PropTypeDescription
is
string
Allows changing the element tag.
name
string
The tab name.
variant
string
Sets the variant style using one of the following prop names.
    bordered
boolean
Enables the bordered variant.
    lifted
boolean
Enables the lifted variant.
size
string
Sets the size. Can be set to one of the below size prop names.
    lg
boolean
Sets the size to lg
    md
boolean
Sets the size to md (the default)
    sm
boolean
Sets the size to sm
    xs
boolean
Sets the size to xs

TabContent

TabContent shows content for each tab. It can be customized using the following props:

PropTypeDescription
is
string
Allows changing the element tag.
name
string
The tab name. Must match the one on the matching Tab component.

Initial Tab

The first tab will automatically show unless specified using the tab prop of TabsManager. Set the tab equal to the name property on the matching TabContent.

Bocconcini caerphilly cheesy grin. Hard cheese rubber cheese bavarian bergkase taleggio manchego cream cheese cut the cheese mascarpone. Airedale mascarpone melted cheese airedale cheddar who moved my cheese boursin everyone loves. Taleggio. Roquefort caerphilly melted cheese.

Queso danish fontina cheese slices babybel cheese on toast swiss macaroni cheese boursin. Pecorino port-salut swiss cow bocconcini cheddar everyone loves smelly cheese. Everyone loves.

Code Example
<TabsManager tab="Second">
  <Tabs :tabs="['First', 'Second', 'Third']" />
  <TabContent name="First">
    First tab content
  </TabContent>
  <TabContent name="Second">
    Second tab content
  </TabContent>
  <TabContent name="Third">
    Third tab content
  </TabContent>
</TabsManager>

Outside Control

Use v-model:tab on TabsManager to switch tabs from outside. In the below example, the Button components are synchronized with the current tab.

Danish fontina parmesan cheese on toast. Pepper jack chalk and cheese chalk and cheese goat cheese strings say cheese st. agur blue cheese brie. Macaroni cheese mascarpone cut the cheese halloumi ricotta camembert de normandie mascarpone mozzarella. Edam everyone loves camembert de normandie stinking bishop cottage cheese monterey jack cheesecake. Cheeseburger caerphilly hard cheese.

Boursin jarlsberg queso melted cheese manchego cheese and biscuits bocconcini mascarpone. Cheesy feet the big cheese parmesan mascarpone feta when the cheese comes out everybody's happy pecorino cheesecake. Monterey jack st. agur blue cheese stilton cheesy feet stinking bishop fromage frais smelly cheese.

Code Example
<TabsManager v-model:tab="currentTab">
  <Tabs :tabs="['First', 'Second', 'Third']" />
  <TabContent name="First">
    First tab content
  </TabContent>
  <TabContent name="Second">
    Second tab content
  </TabContent>
  <TabContent name="Third">
    Third tab content
  </TabContent>
</TabsManager>

Bordered Tabs

Set variant="bordered" or bordered props on the Tabs component to show a clean line under the active tab.

Danish fontina parmesan cheese on toast. Pepper jack chalk and cheese chalk and cheese goat cheese strings say cheese st. agur blue cheese brie. Macaroni cheese mascarpone cut the cheese halloumi ricotta camembert de normandie mascarpone mozzarella. Edam everyone loves camembert de normandie stinking bishop cottage cheese monterey jack cheesecake. Cheeseburger caerphilly hard cheese.

Boursin jarlsberg queso melted cheese manchego cheese and biscuits bocconcini mascarpone. Cheesy feet the big cheese parmesan mascarpone feta when the cheese comes out everybody's happy pecorino cheesecake. Monterey jack st. agur blue cheese stilton cheesy feet stinking bishop fromage frais smelly cheese.

Code Example
<TabsManager>
  <Tabs bordered :tabs="['First', 'Second', 'Third']" />
  <TabContent name="First">
    First tab content
  </TabContent>
  <TabContent name="Second">
    Second tab content
  </TabContent>
  <TabContent name="Third">
    Third tab content
  </TabContent>
</TabsManager>

Lifted Tabs

Set variant="lifted" or lifted props on the Tabs component to show a clean line under the active tab.

Danish fontina parmesan cheese on toast. Pepper jack chalk and cheese chalk and cheese goat cheese strings say cheese st. agur blue cheese brie. Macaroni cheese mascarpone cut the cheese halloumi ricotta camembert de normandie mascarpone mozzarella. Edam everyone loves camembert de normandie stinking bishop cottage cheese monterey jack cheesecake. Cheeseburger caerphilly hard cheese.

Boursin jarlsberg queso melted cheese manchego cheese and biscuits bocconcini mascarpone. Cheesy feet the big cheese parmesan mascarpone feta when the cheese comes out everybody's happy pecorino cheesecake. Monterey jack st. agur blue cheese stilton cheesy feet stinking bishop fromage frais smelly cheese.

Code Example
<TabsManager>
  <Tabs lifted :tabs="['First', 'Second', 'Third']" />
  <TabContent name="First">
    First tab content
  </TabContent>
  <TabContent name="Second">
    Second tab content
  </TabContent>
  <TabContent name="Third">
    Third tab content
  </TabContent>
</TabsManager>

Boxed Tabs

Set variant="boxed" or boxed props on the Tabs component to use pill-style boxes around each tab over a full-width background.

Danish fontina parmesan cheese on toast. Pepper jack chalk and cheese chalk and cheese goat cheese strings say cheese st. agur blue cheese brie. Macaroni cheese mascarpone cut the cheese halloumi ricotta camembert de normandie mascarpone mozzarella. Edam everyone loves camembert de normandie stinking bishop cottage cheese monterey jack cheesecake. Cheeseburger caerphilly hard cheese.

Boursin jarlsberg queso melted cheese manchego cheese and biscuits bocconcini mascarpone. Cheesy feet the big cheese parmesan mascarpone feta when the cheese comes out everybody's happy pecorino cheesecake. Monterey jack st. agur blue cheese stilton cheesy feet stinking bishop fromage frais smelly cheese.

Code Example
<TabsManager>
  <Tabs boxed :tabs="['First', 'Second', 'Third']" />
  <TabContent name="First">
    First tab content
  </TabContent>
  <TabContent name="Second">
    Second tab content
  </TabContent>
  <TabContent name="Third">
    Third tab content
  </TabContent>
</TabsManager>

Inline-Boxed Tabs

Set variant="inline-boxed" or inline-boxed props on the Tabs component to use pill-style boxes around each tab over a minimal-width background.

Danish fontina parmesan cheese on toast. Pepper jack chalk and cheese chalk and cheese goat cheese strings say cheese st. agur blue cheese brie. Macaroni cheese mascarpone cut the cheese halloumi ricotta camembert de normandie mascarpone mozzarella. Edam everyone loves camembert de normandie stinking bishop cottage cheese monterey jack cheesecake. Cheeseburger caerphilly hard cheese.

Boursin jarlsberg queso melted cheese manchego cheese and biscuits bocconcini mascarpone. Cheesy feet the big cheese parmesan mascarpone feta when the cheese comes out everybody's happy pecorino cheesecake. Monterey jack st. agur blue cheese stilton cheesy feet stinking bishop fromage frais smelly cheese.

Code Example
<TabsManager>
  <Tabs inline-boxed :tabs="['First', 'Second', 'Third']" />
  <TabContent name="First">
    First tab content
  </TabContent>
  <TabContent name="Second">
    Second tab content
  </TabContent>
  <TabContent name="Third">
    Third tab content
  </TabContent>
</TabsManager>

Custom Tabs

If you want to put custom content inside a Tab, use the Tab component. This next example uses icons in the tabs. Notice in the example code that the lifted and bordered props need to be passed to both the Tabs component and the Tab component.

Danish fontina parmesan cheese on toast. Pepper jack chalk and cheese chalk and cheese goat cheese strings say cheese st. agur blue cheese brie. Macaroni cheese mascarpone cut the cheese halloumi ricotta camembert de normandie mascarpone mozzarella. Edam everyone loves camembert de normandie stinking bishop cottage cheese monterey jack cheesecake. Cheeseburger caerphilly hard cheese.

Boursin jarlsberg queso melted cheese manchego cheese and biscuits bocconcini mascarpone. Cheesy feet the big cheese parmesan mascarpone feta when the cheese comes out everybody's happy pecorino cheesecake. Monterey jack st. agur blue cheese stilton cheesy feet stinking bishop fromage frais smelly cheese.

Code Example
<TabsManager>
  <Tabs inline-boxed>
    <Tab name="First" class="gap-2"><Icon name="feather:home" /> Home</Tab>
    <Tab name="Second" class="gap-2"><Icon name="feather:info" /> Info</Tab>
    <Tab name="Third" class="gap-2"><Icon name="feather:at-sign" /> Mentions</Tab>
  </Tabs>

  <Tabs lifted>
    <Tab lifted name="First" class="gap-2"><Icon name="feather:home" /> Home</Tab>
    <Tab lifted name="Second" class="gap-2"><Icon name="feather:info" /> Info</Tab>
    <Tab lifted name="Third" class="gap-2"><Icon name="feather:at-sign" /> Mentions</Tab>
  </Tabs>

  <Tabs bordered>
    <Tab bordered name="First" class="gap-2"><Icon name="feather:home" /> Home</Tab>
    <Tab bordered name="Second" class="gap-2"><Icon name="feather:info" /> Info</Tab>
    <Tab bordered name="Third" class="gap-2"><Icon name="feather:at-sign" /> Mentions</Tab>
  </Tabs>

  <TabContent name="First">
    First tab content
  </TabContent>
  <TabContent name="Second">
    Second tab content
  </TabContent>
  <TabContent name="Third">
    Third tab content
  </TabContent>
</TabsManager>