Display tab content.
Toggle display of different templates.
Show icon component on label button.
Control components with imperatively style.
useTabs
Control components with hooks
.
Tabs.Props
Attribute | Description | Type | Accepted values | Default |
---|---|---|---|---|
initialValue | initial value | string | - | - |
value | current selected value | string | - | - |
hideDivider | hide default divider | boolean | - | false |
onChange | change event | (val: string) => void | - | - |
... | native props | HTMLAttributes | 'alt', 'id', 'className', ... | - |
Tabs.Item.Props
[alias: Tabs.Tab
]Attribute | Description | Type | Accepted values | Default |
---|---|---|---|---|
label(required) | display tab's label | string | - | - |
value(required) | unique ident value | string | - | - |
disabled | disable current tab | boolean | - | false |
useTabs
type useTabs = (
initialValue: string,
) => {
state: string
setState: Dispatch<SetStateAction<string>>
currentRef: MutableRefObject<string>
bindings: {
value: string
onChange: (val: string) => void
}
}