Component to render tabs.
The Tabs
component can be configured to render the tabs list in various styles by changing position
and type
parameters.
The Tabs component can be imported using
import { Tabs } from '@tail-kit/tail-kit'
Tabs Position:
Tab Style:
Name | Description | Default Value |
---|---|---|
tab | Key of the tab selected string | undefined | -- |
defaultTab | Key of the default tab selected. This should be used when the Tab component is used in uncontrolled way string | undefined | -- |
onTabChange | Callback function called when the active tab is changed. ((activeTabKey: string) => void) | undefined | -- |
type | The type of the tab item rendered inside the tabs list. If it is pill, then it would render
the tab title and icon with pills and else the active tab would be underlined "pill" | "underline" | undefined | underline |
position | The position of the tabs list with respect to the content.
By default the tabs list would be rendered over the top of the content. "top" | "bottom" | "left" | "right" | undefined | top |
tabs | Tab[] | -- |
extraContent | Extra content to be rendered in the tabs list.
It would be rendered at the end of the tabs list. It won't scroll even if the tabs list might scroll ReactNode | -- |
className | Additional classes for styling string | undefined | -- |
style | Additional styles CSSProperties | undefined | -- |
tabBarClassName | Additional classes for styling tab bar string | undefined | -- |
tabBarStyle | Additonal styles for tab bar CSSProperties | undefined | -- |