Skip to content
On this page

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.
Show code

Types

Show code

Position

Show code

Sizes

Show code

Vertical

Show code

Custom header

Show code

Long header

Show code

Class props

'Classes applied to the element'
Lorem ipsum dolor sit amet.
How does the Class props inspector work?
Class propDescriptionPropsSuffixes
contentClassClass of the tab content.
expandedClassClass of Tabs component when expanded.expanded
itemClassClass of the tab item.
itemHeaderActiveClassClass of the tab item header when active.default
boxed
toggle
itemHeaderClassClass of the tab item header.
🔍 Classes applied have a higher specificity than expected when verticalClass or expandedClass or positionClass is applied
itemHeaderDisabledClassClass of the tab item header when disabled.default
boxed
toggle
itemHeaderIconClassClass of the tab item header icon.
itemHeaderTextClassClass of the tab item header text.
itemHeaderTypeClassClass of the tab item header type.default
boxed
toggle
multilineClassClass of Tabs component when multiline.multiline
navPositionClassClass of the Tabs component nav position.positionbottom
left
right
navSizeClassSize of the navigation.sizesmall
medium
large
navTabsClassClass of the Tabs component nav tabs.
🔍 Classes applied have a higher specificity than expected when positionClass is applied
navTypeClassType of the navigation.typedefault
boxed
toggle
positionClassClass of Tabs component when when is vertical and its position changes.position
vertical
bottom
left
right
rootClassRoot class of the element.
tabItemWrapperClassClass of the tab item wrapper.
🔍 Classes applied have a higher specificity than expected when expandedClass is applied
verticalClassClass of Tabs component when vertical.vertical

Tabs component

html
<o-tabs></o-tabs>

Props

Prop nameDescriptionTypeValuesDefault
animatedTab will have an animationboolean-
From config:
tabs: {
  animated: true
}
expandedTabs will be expanded (full-width)boolean-
multilineShow tab items multiline when there is no spaceboolean-
overrideboolean-
typeTab typestringboxed, toggle'default'

Slots

NameDescriptionBindings
start
end
default

TabItem component

html
<o-tab-item></o-tab-item>

Props

Prop nameDescriptionTypeValuesDefault
disabledItem will be disabledboolean-
overrideboolean-
tagTabs item tag namestring | Component-
From config:
tabs: {
  itemTag: 'button'
}

Sass variables

Current theme ➜ Oruga Base

SASS VariableDefault
$tabs-disabled-opacity$base-disabled-opacity
$tabs-font-size$base-font-size
$tabs-icon-margin0.5em
$tabs-content-padding1rem
$tabs-margin-bottom1.5rem
$tabs-border-bottom-color$grey-lighter
$tabs-border-bottom-stylesolid
$tabs-border-bottom-width1px
$tabs-link-colorhsl(0, 0%, 29%)
$tabs-link-active-border-bottom-color$primary
$tabs-link-active-color$primary
$tabs-link-line-height$base-line-height
$tabs-link-padding0.5em 1em
$tabs-boxed-link-radius$base-border-radius
$tabs-boxed-link-hover-background-colorhsl(0, 0%, 96%)
$tabs-boxed-link-hover-border-bottom-colorhsl(0, 0%, 86%)
$tabs-boxed-link-active-background-colorhsl(0, 0%, 100%)
$tabs-boxed-link-active-border-colorhsl(0, 0%, 86%)
$tabs-boxed-link-active-border-bottom-colortransparent
$tabs-toggle-link-border-colorhsl(0, 0%, 86%)
$tabs-toggle-link-border-stylesolid
$tabs-toggle-link-border-width1px
$tabs-toggle-link-hover-background-colorhsl(0, 0%, 96%)
$tabs-toggle-link-hover-border-colorhsl(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 VariableDefault
$tabs-disabled-opacity$base-disabled-opacity
$tabs-font-size$base-font-size
$tabs-icon-margin0.5em
$tabs-content-padding1rem
$tabs-margin-bottom1.5rem
$tabs-border-bottom-color$grey-lighter
$tabs-border-bottom-stylesolid
$tabs-border-bottom-width1px
$tabs-link-colorhsl(0, 0%, 29%)
$tabs-link-active-border-bottom-color$primary
$tabs-link-active-color$primary
$tabs-link-line-height$base-line-height
$tabs-link-padding0.5em 1em
$tabs-boxed-link-radius$base-border-radius
$tabs-boxed-link-hover-background-colorhsl(0, 0%, 96%)
$tabs-boxed-link-hover-border-bottom-colorhsl(0, 0%, 86%)
$tabs-boxed-link-active-background-colorhsl(0, 0%, 100%)
$tabs-boxed-link-active-border-colorhsl(0, 0%, 86%)
$tabs-boxed-link-active-border-bottom-colortransparent
$tabs-toggle-link-border-colorhsl(0, 0%, 86%)
$tabs-toggle-link-border-stylesolid
$tabs-toggle-link-border-width1px
$tabs-toggle-link-hover-background-colorhsl(0, 0%, 96%)
$tabs-toggle-link-hover-border-colorhsl(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 VariableDefault
$nav-tabs-colorvar(--#{$prefix}body-color)
$nav-tabs-spacer$spacer
$nav-tabs-disabled-opacity0.5
$nav-underline-link-active-bg$nav-tabs-link-active-bg
$nav-underline-link-active-border-colorcurrentcolor

See ➜ 📄 Full scss file

Released under the MIT License.