Tabs
Tab elements are used to switch between multiple sections of related content.
Example
Switching between tabs will fade-in the content associated to the selected tab. Here are some things to keep in mind:
- A specific tab can be opened by default using the
v-modeldirective - You must to assign a tab
nameto the<i-tab>components - You must reference the chosen tab name using the
forproperty of the<i-tab-title>components
When you have a large number of tabs, the tabs header will scroll horizontally.
Stretch Header
You can have a full width tabs header using the stretch property. Make sure you use it only when having a small number of tabs.
Size Variants
You’re able to use the size property to control the size of your tabs, using one of the available sizes: sm, md, and lg. The default size is set to md.
Color Variants
Inkline includes basic predefined tabs styles that you can use within your application. You can apply a style using the color property.
Configuration
Props
Use props to modify the component’s design and behavior.
- Property
colorType'light' | 'dark'Default'light'Description The color variant of the tabs - Property
modelValueTypeStringDefault''Description Used to set the currently active tab - Property
sizeType'sm' | 'md' | 'lg'Default'md'Description The size variant of the tabs - Property
stretchTypeBooleanDefaultfalseDescription Display the tabs header as full width
Slots
Use slots to insert custom content into well-defined component locations.
- Property
defaultDescription Slot for default tabs content
Events
Use events to react to something happening inside the component.
- Property
update:modelValueDescription Event emitted for setting the modelValue
CSS Variables
Read more about configuring Inkline’s Design System variables to update the look and feel of the component.
- Property
----backgroundValuecolor('white')Description The background of the tabs component - Property
----border-top-colorValuecolor('light')Description The border top color of the tabs component - Property
----border-right-colorValuecolor('light')Description The border right color of the tabs component - Property
----border-bottom-colorValuecolor('light')Description The border bottom color of the tabs component - Property
----border-left-colorValuecolor('light')Description The border left color of the tabs component - Property
----border-colorValuevar(----border-top-color) var(----border-right-color) var(----border-bottom-color) var(----border-left-color)Description The border color of the tabs component - Property
----border-styleValuevar(--border-style)Description The border style of the tabs component - Property
----border-top-widthValuevar(--border-top-width)Description The border top width of the tabs component - Property
----border-right-widthValuevar(--border-right-width)Description The border right width of the tabs component - Property
----border-bottom-widthValuevar(--border-bottom-width)Description The border bottom width of the tabs component - Property
----border-left-widthValuevar(--border-left-width)Description The border left width of the tabs component - Property
----border-widthValuevar(----border-top-width) var(----border-right-width) var(----border-bottom-width) var(----border-left-width)Description The border width of the tabs component - Property
----border-top-left-radiusValuevar(--border-top-left-radius)Description The border top left radius of the tabs component - Property
----border-top-right-radiusValuevar(--border-top-right-radius)Description The border top right radius of the tabs component - Property
----border-bottom-right-radiusValuevar(--border-bottom-right-radius)Description The border bottom right radius of the tabs component - Property
----border-bottom-left-radiusValuevar(--border-bottom-left-radius)Description The border bottom left radius of the tabs component - Property
----border-radiusValuevar(----border-top-left-radius) var(----border-top-right-radius) var(----border-bottom-right-radius) var(----border-bottom-left-radius)Description The border radius of the tabs component - Property
----box-shadow-offset-xValuevar(--box-shadow-offset-x)Description The box shadow horizontal offset of the tabs component - Property
----box-shadow-offset-yValuevar(--box-shadow-offset-y)Description The box shadow vertical offset of the tabs component - Property
----box-shadow-blur-radiusValuevar(--box-shadow-blur-radius)Description The box shadow blur radius of the tabs component - Property
----box-shadow-spread-radiusValuevar(--box-shadow-spread-radius)Description The box shadow spread radius of the tabs component - Property
----box-shadow-colorValuevar(--box-shadow-color)Description The box shadow spread radius of the tabs component - Property
----box-shadowValuevar(----box-shadow-offset-x) var(----box-shadow-offset-y) var(----box-shadow-blur-radius) var(----box-shadow-spread-radius) var(----box-shadow-color)Description The box shadow of the tabs component - Property
----colorValuecontrast-color($color-white)Description The color of the tabs component item - Property
----font-sizeValuefont-size()Description The font size of the tabs component - Property
----padding-topValuevar(--padding-top)Description The padding top of the tabs component - Property
----padding-rightValuevar(--padding-right)Description The padding right of the tabs component - Property
----padding-bottomValuevar(--padding-bottom)Description The padding bottom of the tabs component - Property
----padding-leftValuevar(--padding-left)Description The padding left of the tabs component - Property
----paddingValuevar(----padding-top) var(----padding-right) var(----padding-bottom) var(----padding-left)Description The padding of the tabs component - Property
----header--backgroundValuecolor('white')Description The background of the tabs component header - Property
----header--background--activeValuecolor('white')Description The background of the tabs component header when active - Property
----header--background--hoverValuecolor('gray-05')Description The background of the tabs component header when hovered or focused - Property
----header--border-colorValuetransparentDescription The border color of the tabs component header - Property
----header--border-color--activeValuecolor('primary')Description The border color of the tabs component header when active - Property
----header--color--activeValuevar(----color)Description The color of the tabs component header when active - Property
----header--border-styleValuevar(--border-style)Description The border style of the tabs component header - Property
----header--border-top-widthValue0Description The border top width of the tabs component header - Property
----header--border-right-widthValue0Description The border right width of the tabs component header - Property
----header--border-bottom-widthValue2pxDescription The border bottom width of the tabs component header - Property
----header--border-left-widthValue0Description The border left width of the tabs component header - Property
----header--border-widthValuevar(----header--border-top-width) var(----header--border-right-width) var(----header--border-bottom-width) var(----header--border-left-width)Description The border width of the tabs component header - Property
----header--margin-bottomValue-1pxDescription The bottom margin of the tabs component header - Property
----header--padding-topValuevar(----padding-top)Description The padding top of the tabs component header - Property
----header--padding-rightValuevar(----padding-right)Description The padding right of the tabs component header - Property
----header--padding-bottomValuevar(----padding-bottom)Description The padding bottom of the tabs component header - Property
----header--padding-leftValuevar(----padding-left)Description The padding left of the tabs component header - Property
----header--paddingValuevar(----header--padding-top) var(----header--padding-right) var(----header--padding-bottom) var(----header--padding-left)Description The padding of the tabs component header