Skip to main content
Version: Next

Tabs API

import { Tabs } from '@editora/ui-react';

Props​

PropTypeDescription
activation'auto' | 'manual'
bareboolean
childrenReact.ReactNode
density'compact' | 'default' | 'comfortable'
elevation'low' | 'none' | 'high'
headlessboolean
loopboolean
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 }>) => voidBefore 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'
selectednumber | string
shape'rounded' | 'square' | 'pill'
size'sm' | 'md' | 'lg'
stretchedboolean
tone'brand' | 'success' | 'warning' | 'danger'
valuestring
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​

PropTypeDescription
disabledboolean
hrefstringA route tab: selecting it navigates (onNavigate / NavigationProvider, else a page load).
iconstring
valuestring

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