Tabs API
import { Tabs } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
activation | 'auto' | 'manual' | |
bare | boolean | |
children | React.ReactNode | |
density | 'compact' | 'default' | 'comfortable' | |
elevation | 'low' | 'none' | 'high' | |
headless | boolean | |
loop | boolean | |
navigation | 'native' | 'client' | client never does a page load for route tabs. |
onChange | (index: number) => void | |
onNavigate | (detail: ComponentNavigateDetail<{ index: number; value: string; label: string }>) => void | Before a link is followed. detail.preventDefault() keeps the page so your router handles detail.href; a surrounding NavigationProvider does this for every component at once. |
onTabChange | (detail: TabsDetail) => void | |
orientation | 'horizontal' | 'vertical' | |
selected | number | string | |
shape | 'rounded' | 'square' | 'pill' | |
size | 'sm' | 'md' | 'lg' | |
stretched | boolean | |
tone | 'brand' | 'success' | 'warning' | 'danger' | |
value | string | |
variant | | 'default' | 'soft' | 'outline' | 'solid' | 'ghost' | 'glass' | 'indicator' | 'indicator-line' | 'contrast' | 'minimal' | 'underline' | 'line' | 'segmented' | 'cards' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Tabs.Tab props
| Prop | Type | Description |
|---|---|---|
disabled | boolean | |
href | string | A route tab: selecting it navigates (onNavigate / NavigationProvider, else a page load). |
icon | string | |
value | string |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Tabs.Panel props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-tabs>
Tabs renders the ui-tabs custom element from @editora/ui-core, which can also be used without React.
Attributes: activation, aria-label, aria-labelledby, bare, density, elevation, headless, loop, orientation, selected, shape, size, stretched, tone, value, variant
Events: change, focus, select