TabNavButton / Dev
Install
yarn add @ntds/tabs
Import
import { TabNavButton } from '@ntds/tabs';
Props
TabNavButton
Prop | Type & Description |
---|---|
tabIndex | number Default value: "0" Enable/disable tab selection. |
onClick | MouseEventHandler<HTMLElement> Standard click event |
isSelected | boolean Default value: "false" Whether or not the tab should be marked active or not |
isDisabled | boolean Default value: "false" Deactivates the tab for clicks and removes tab-index |
elementRef | Ref<HTMLButtonElement> Get the DOM-reference from the button-element |
tw | TwGroupKeys Tailwind overrides |
render | (props: Omit<Props, "render" | "tw" | "elementRef" | "targetTabPanelId">) => Element Hook into the top render method of the wrapping element |
children | ReactNode Usually simple text, but can be anything. |