- Android
- iOS
- Web
Tabs
A Tabs component is a UI element that allows users to switch between different views or sections of content within the same interface. Organized as a series of labeled tabs, this component enhances navigation by displaying only one section at a time, helping to reduce clutter and improve user experience. Users can easily access various related content or features by clicking on the respective tabs, making it ideal for dashboards, settings pages, or any multi-section layout.
Example.tsx
| Name | Type | Default | Details |
|---|---|---|---|
| items | readonly (string | NTabsItem)[] | Optional | |
| children | ReactNode | Optional | |
| value | string | Optional | |
| selected | string | Optional | |
| defaultValue | string | Optional | |
| onValueChange | ((value: string) => void) | Optional | |
| onChange | ((value: string) => void) | Optional | |
| variant | "primary" | "secondary" | Optional | Primary uses a rounded track. Secondary marks the active tab with an underline. |
| orientation | "horizontal" | "vertical" | Optional | |
| isFull | boolean | Optional | Fill the available width of a horizontal tab list. |
| className | string | Optional | Supported Tailwind-style utilities, resolved entirely in Rust. See the engine README. |
| listClassName | string | Optional | |
| tabClassName | string | Optional | |
| itemClassName | string | Optional | Alias for tabClassName. |
| triggerClassName | string | Optional | Alias for tabClassName. |
| activeItemClassName | string | Optional | |
| contentClassName | string | Optional | |
| ariaLabel | string | Optional | |
| id | string | Optional |