Skip to main content

Tabs

Tabbed navigation component with multiple visual variants. Supports horizontal and vertical orientations.

Import​

import { Tabs } from '@scaffald/ui';

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Tabs defaultValue="tab1">
  <Tabs.Item value="tab1">
    <Tabs.Trigger><Text>Tab 1</Text></Tabs.Trigger>
    <Tabs.Content><Text>Content for Tab 1</Text></Tabs.Content>
  </Tabs.Item>
  <Tabs.Item value="tab2">
    <Tabs.Trigger><Text>Tab 2</Text></Tabs.Trigger>
    <Tabs.Content><Text>Content for Tab 2</Text></Tabs.Content>
  </Tabs.Item>
  <Tabs.Item value="tab3">
    <Tabs.Trigger><Text>Tab 3</Text></Tabs.Trigger>
    <Tabs.Content><Text>Content for Tab 3</Text></Tabs.Content>
  </Tabs.Item>
</Tabs>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All Tabs components accept standard React Native View props.

Variants​

See component props for available variants.

Examples​

With Content​

// Example implementation
<Tabs variant="default">
Example content
</Tabs>

Accessibility​

  • Keyboard navigation support
  • Screen reader compatible
  • ARIA attributes included
  • Focus management

Design Tokens​

This component uses the following design tokens:

  • Colors: colors.{semantic}.{theme}.{variant}
  • Spacing: spacing.*
  • Typography: typography.*

See Design Tokens for more information.

Changelog​

See GitHub Releases for version history.