Skip to content
On this page

Tabs

Responsive horizontal navigation tabs, switch between contents with ease

Base



Lorem ipsum dolor sit amet.
Show code

Custom header

Show code

Long header

Show code

Vertical

Show code

Types

Show code

Position

Show code

Class props


Lorem ipsum dolor sit amet.
How does 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


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

Tab Item

Props

Prop nameDescriptionTypeValuesDefault
disabledItem will be disabledboolean-
overrideboolean-
tagTabs item tag namestring-
From config

tabs: {
  itemTag: 'button'
}

Style

📄 Full scss file

CSS VariableSASS VariableDefault
--oruga-tabs-disabled-opacity$tabs-disabled-opacity$base-disabled-opacity
--oruga-tabs-font-size$tabs-font-size$base-font-size
--oruga-tabs-icon-margin$tabs-icon-margin0.5em
--oruga-tabs-content-padding$tabs-content-padding1rem
--oruga-tabs-margin-bottom$tabs-margin-bottom1.5rem
--oruga-tabs-border-bottom-color$tabs-border-bottom-color$grey-lighter
--oruga-tabs-border-bottom-style$tabs-border-bottom-stylesolid
--oruga-tabs-border-bottom-width$tabs-border-bottom-width1px
--oruga-tabs-link-color$tabs-link-colorhsl(0, 0%, 29%)
--oruga-tabs-link-active-border-bottom-color$tabs-link-active-border-bottom-color$primary
--oruga-tabs-link-active-color$tabs-link-active-color$primary
--oruga-tabs-link-line-height$tabs-link-line-height$base-line-height
--oruga-tabs-link-padding$tabs-link-padding0.5em 1em
--oruga-tabs-boxed-link-radius$tabs-boxed-link-radius$base-border-radius
--oruga-tabs-boxed-link-hover-background-color$tabs-boxed-link-hover-background-colorhsl(0, 0%, 96%)
--oruga-tabs-boxed-link-hover-border-bottom-color$tabs-boxed-link-hover-border-bottom-colorhsl(0, 0%, 86%)
--oruga-tabs-boxed-link-active-background-color$tabs-boxed-link-active-background-colorhsl(0, 0%, 100%)
--oruga-tabs-boxed-link-active-border-color$tabs-boxed-link-active-border-colorhsl(0, 0%, 86%)
--oruga-tabs-boxed-link-active-border-bottom-color$tabs-boxed-link-active-border-bottom-colortransparent
--oruga-tabs-toggle-link-border-color$tabs-toggle-link-border-colorhsl(0, 0%, 86%)
--oruga-tabs-toggle-link-border-style$tabs-toggle-link-border-stylesolid
--oruga-tabs-toggle-link-border-width$tabs-toggle-link-border-width1px
--oruga-tabs-toggle-link-hover-background-color$tabs-toggle-link-hover-background-colorhsl(0, 0%, 96%)
--oruga-tabs-toggle-link-hover-border-color$tabs-toggle-link-hover-border-colorhsl(0, 0%, 71%)
--oruga-tabs-toggle-link-radius$tabs-toggle-link-radius$base-border-radius
--oruga-tabs-toggle-link-active-background-color$tabs-toggle-link-active-background-color$primary
--oruga-tabs-toggle-link-active-border-color$tabs-toggle-link-active-border-color$primary
--oruga-tabs-toggle-link-active-color$tabs-toggle-link-active-color$primary-invert

Released under the MIT License.