Tabs
Responsive horizontal navigation tabs, switch between contents with ease
Examples
Base
hat light is light, if Silvia be not seen?
What joy is joy.
What joy is joy.
Show code
Types
Show code
Position
Show code
Sizes
Show code
Vertical
Show code
Custom header
Show code
Long header
Show code
Class props
Lorem ipsum dolor sit amet.
Class prop | Description | Props | Suffixes | |
---|---|---|---|---|
contentClass | Class of the tab content. | |||
expandedClass | Class of Tabs component when expanded. | expanded | ||
▷ itemClass | Class of the tab item. | |||
▷ itemHeaderActiveClass | Class of the tab item header when active. | default | ||
▷ itemHeaderClass | Class of the tab item header. 🔍 Classes applied have a higher specificity than expected when verticalClass or expandedClass or positionClass is applied | |||
▷ itemHeaderDisabledClass | Class of the tab item header when disabled. | default | ||
▷ itemHeaderIconClass | Class of the tab item header icon. | |||
▷ itemHeaderTextClass | Class of the tab item header text. | |||
▷ itemHeaderTypeClass | Class of the tab item header type. | default | ||
multilineClass | Class of Tabs component when multiline. | multiline | ||
navPositionClass | Class of the Tabs component nav position. | position | bottom | |
navSizeClass | Size of the navigation. | size | small | |
navTabsClass | Class of the Tabs component nav tabs. 🔍 Classes applied have a higher specificity than expected when positionClass is applied | |||
navTypeClass | Type of the navigation. | type | default | |
positionClass | Class of Tabs component when when is vertical and its position changes. | position | bottom | |
rootClass | Root class of the element. | |||
tabItemWrapperClass | Class of the tab item wrapper. 🔍 Classes applied have a higher specificity than expected when expandedClass is applied | |||
verticalClass | Class of Tabs component when vertical. | vertical |
Tabs component
html
<o-tabs></o-tabs>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
animated | Tab will have an animation | boolean | - | From config: tabs: { |
expanded | Tabs will be expanded (full-width) | boolean | - | |
multiline | Show tab items multiline when there is no space | boolean | - | |
override | boolean | - | ||
type | Tab type | string | boxed , toggle | 'default' |
Slots
Name | Description | Bindings |
---|---|---|
start | ||
end | ||
default |
TabItem component
html
<o-tab-item></o-tab-item>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
disabled | Item will be disabled | boolean | - | |
override | boolean | - | ||
tag | Tabs item tag name | string | Component | - | From config: tabs: { |
Sass variables
Current theme ➜ Oruga Base
SASS Variable | Default |
---|---|
$tabs-disabled-opacity | $base-disabled-opacity |
$tabs-font-size | $base-font-size |
$tabs-icon-margin | 0.5em |
$tabs-content-padding | 1rem |
$tabs-margin-bottom | 1.5rem |
$tabs-border-bottom-color | $grey-lighter |
$tabs-border-bottom-style | solid |
$tabs-border-bottom-width | 1px |
$tabs-link-color | hsl(0, 0%, 29%) |
$tabs-link-active-border-bottom-color | $primary |
$tabs-link-active-color | $primary |
$tabs-link-line-height | $base-line-height |
$tabs-link-padding | 0.5em 1em |
$tabs-boxed-link-radius | $base-border-radius |
$tabs-boxed-link-hover-background-color | hsl(0, 0%, 96%) |
$tabs-boxed-link-hover-border-bottom-color | hsl(0, 0%, 86%) |
$tabs-boxed-link-active-background-color | hsl(0, 0%, 100%) |
$tabs-boxed-link-active-border-color | hsl(0, 0%, 86%) |
$tabs-boxed-link-active-border-bottom-color | transparent |
$tabs-toggle-link-border-color | hsl(0, 0%, 86%) |
$tabs-toggle-link-border-style | solid |
$tabs-toggle-link-border-width | 1px |
$tabs-toggle-link-hover-background-color | hsl(0, 0%, 96%) |
$tabs-toggle-link-hover-border-color | hsl(0, 0%, 71%) |
$tabs-toggle-link-radius | $base-border-radius |
$tabs-toggle-link-active-background-color | $primary |
$tabs-toggle-link-active-border-color | $primary |
$tabs-toggle-link-active-color | $primary-invert |
See ➜ 📄 Full scss file
Current theme ➜ Oruga Full
SASS Variable | Default |
---|---|
$tabs-disabled-opacity | $base-disabled-opacity |
$tabs-font-size | $base-font-size |
$tabs-icon-margin | 0.5em |
$tabs-content-padding | 1rem |
$tabs-margin-bottom | 1.5rem |
$tabs-border-bottom-color | $grey-lighter |
$tabs-border-bottom-style | solid |
$tabs-border-bottom-width | 1px |
$tabs-link-color | hsl(0, 0%, 29%) |
$tabs-link-active-border-bottom-color | $primary |
$tabs-link-active-color | $primary |
$tabs-link-line-height | $base-line-height |
$tabs-link-padding | 0.5em 1em |
$tabs-boxed-link-radius | $base-border-radius |
$tabs-boxed-link-hover-background-color | hsl(0, 0%, 96%) |
$tabs-boxed-link-hover-border-bottom-color | hsl(0, 0%, 86%) |
$tabs-boxed-link-active-background-color | hsl(0, 0%, 100%) |
$tabs-boxed-link-active-border-color | hsl(0, 0%, 86%) |
$tabs-boxed-link-active-border-bottom-color | transparent |
$tabs-toggle-link-border-color | hsl(0, 0%, 86%) |
$tabs-toggle-link-border-style | solid |
$tabs-toggle-link-border-width | 1px |
$tabs-toggle-link-hover-background-color | hsl(0, 0%, 96%) |
$tabs-toggle-link-hover-border-color | hsl(0, 0%, 71%) |
$tabs-toggle-link-radius | $base-border-radius |
$tabs-toggle-link-active-background-color | $primary |
$tabs-toggle-link-active-border-color | $primary |
$tabs-toggle-link-active-color | $primary-invert |
See ➜ 📄 Full scss file
Current theme ➜ Bulma
The theme does not have any custom variables for this component.
Current theme ➜ Bootstrap
SASS Variable | Default |
---|---|
$nav-tabs-color | var(--#{$prefix}body-color) |
$nav-tabs-spacer | $spacer |
$nav-tabs-disabled-opacity | 0.5 |
$nav-underline-link-active-bg | $nav-tabs-link-active-bg |
$nav-underline-link-active-border-color | currentcolor |
See ➜ 📄 Full scss file