Skip to content

TabLine

TabLine

Wrap over the tab elements.

jsx
import TabLine from '@semcore/ui/tab-line';
<TabLine />;

TabLineProps

& & {...}
NameTypeDescription
size"m" | "l" | false TabLine size
underlinedboolean Adds a bottom border for the entire component
onChange((value: , e: React.SyntheticEvent<>) => void) | React.Dispatch<React.SetStateAction<>> Is invoked when changing the selection
value Value of the selected tab
defaultValue Default value of the selected tab
behavior"auto" | "manual" Behavior of tabs. In `auto`, changes the tab immediately when press arrow. In `manual`, needs to press `space` or `enter` for select a choice.

TabLine.Item

This tab element may contain Addon and Text. The structure is similar to Button. It takes some properties of the TabLine (for example, size, disabled) and can override them.

jsx
import TabLine from '@semcore/ui/tab-line';
<TabLine.Item />;

TabLineItemProps

& & & {...}
NameTypeDescription
selectedboolean Makes a tab selected. This property is determined automatically depending on the value.
disabledboolean Disabled state
value Tab value
addonLeftReact.ElementType Left addon tag
addonRightReact.ElementType Right addon tag

TabLine.Item.Addon

The addon inside the tab (most commonly an icon) sets the correct indents depending on the size. It takes all the properties of the Box.

jsx
import TabLine from '@semcore/ui/tab-line';
<TabLine.Item.Addon />;

TabLine.Item.Text

This ordinary text sets the appropriate indents depending on the size. If a simple text without addons is used in the Tab, it will turn into TabLine.Item.Text automatically.

It takes all the properties of the Box.

jsx
import TabLine from '@semcore/ui/tab-line';
<TabLine.Item.Text />;

Released under the MIT License.

Released under the MIT License.