Skip to main content

Tab Set

Implementation#

import { TabSet, TabItem } from "slipstream-ui";
const Example = () => (
<TabSet>
<TabItem active={active}>Home</TabItem>
<TabItem>About</TabItem>
<TabItem>Projects</TabItem>
<TabItem>Contact</TabItem>
</TabSet>
);

Default Example#

<TabSet>
<TabItem active>Home</TabItem>
...
</TabSet>

Border#

<TabSet border>
<TabItem active>Home</TabItem>
...
</TabSet>

Background#

<TabSet background>
<TabItem active>Home</TabItem>
...
</TabSet>

Vertical#

<TabSet vertical background>
<TabItem active>Home</TabItem>
...
</TabSet>

Right-To-Left (rtl)#

<TabSet background>
<TabItem active>Home</TabItem>
...
</TabSet>

Props#

TabSet#

AttributeTypeValueDefault ValueDescription
backgroundbooleantrue/falseundefinedSet background color to active and pseudo states of TabItem components
borderbooleantrue/falseundefinedSet border color to active and pseudo states of TabItem components
verticalbooleantrue/falseundefinedSet TabItem components to vertical alignment
tagstringnav/ul/divnavChange TabSet container element to different HTML elements
tabsobjectTabItemMappedProps[]undefinedWhen defined maps tabs automatically as children components
rtlbooleantrue/falseundefinedWhen true, sets element to direction of right-to-left (rtl)

TabItem#

AttributeTypeValueDefault ValueDescription
activebooleantrue/falseundefinedWhen true, sets UI to active state and adds "active" class to element
backgroundbooleantrue/falseundefinedInherit from TabSet
borderbooleantrue/falseundefinedInherit from TabSet
tagstringli/a/div/inputaChange TabItem element to different HTML elements