s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Navigation

Tabs

Tabs - Tab navigation component refactored for Material 3 Provides tabbed navigation with optional counts and content slots. Accessibility: - Supports keyboard navigation with Arrow keys - Proper ARIA roles: tablist, tab, tabpanel - aria-selected indicates active tab - aria-controls links tab to panel

Public export

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

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

Bindable state

This component has no bindable public state.

Callback events

  • onchange(id: string) => void

Examples and explanation