smrt
Open the smrt source on GitHub Switch to dark color scheme
← All UI components

Navigation

Tabs

Tab navigation component. Provides tabbed navigation with optional counts and content slots.

Public export

typescript
import { Tabs } from '@happyvertical/smrt-ui';
Import path
@happyvertical/smrt-ui
Props
10
Props described
10 of 10
Bindable state
0
Callback events
1
Verified release
0.62.10

Props

NameTypeRequiredDescription
tabsTab[]YesAvailable tabs
activestringYesCurrently active tab id
onchange(id: string) => voidNoCalled when tab changes
size'sm' | 'md' | 'lg'NoSize variant
variant'primary' | 'secondary'NoVisual variant
childrenSnippetNoTab content slot
aria-labelstringNoAccessible label for the tablist
maxVisiblenumberNoLink tabs only: most tabs shown in the row; the rest go under "More".
moreLabelstringNoLink tabs only: label of the overflow menu (default "More").
moreBadgeLabelstringNoLink tabs only: screen-reader text for the "More" attention dot.

Bindable state

This component has no bindable public state.

Callback events

  • onchange(id: string) => void

Examples and explanation