API reference: @salmonui/navigation/tabs
TabPropsinterface
import type { TabProps } from '@salmonui/navigation/tabs';interface TabProps extends TabDomProps {
readonly value: string;
readonly children?: ReactNode;
readonly icon?: ReactNode;
readonly iconPlacement?: TabIconPlacement;
readonly disabled?: boolean | undefined;
readonly hidden?: boolean | undefined;
readonly onClose?: ((event: TabCloseEvent) => void) | undefined;
readonly render?: ((props: TabRenderProps) => ReactElement) | undefined;
readonly className?: string;
readonly style?: CSSProperties;
readonly ref?: Ref<HTMLElement>;
}
| Name | Signature | Description |
|---|---|---|
value | readonly value: string; | Stable key of the tab; matches its |
childrenoptional | readonly children?: ReactNode; | The label. |
iconoptional | readonly icon?: ReactNode; | Decorative icon ( |
iconPlacementoptional | readonly iconPlacement?: TabIconPlacement; | Default |
disabledoptional | readonly disabled?: boolean | undefined; |
|
hiddenoptional | readonly hidden?: boolean | undefined; | Not shown (the element stays in the DOM with |
onCloseoptional | readonly onClose?: ((event: TabCloseEvent) => void) | undefined; | Shows a close button and handles Delete on the focused tab; the application removes the tab. |
renderoptional | readonly render?: ((props: TabRenderProps) => ReactElement) | undefined; | Custom element (a router link); receives every computed prop. |
classNameoptional | readonly className?: string; | |
styleoptional | readonly style?: CSSProperties; | |
refoptional | readonly ref?: Ref<HTMLElement>; | The |