Skip to main content

Sidebar

Sidebar component from Scaffald UI component library.

Import​

import { Sidebar, SidebarHeader, SidebarMenuItem } from '@scaffald/ui';

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Stack style={{borderWidth: 1, borderColor: '#e0e0e0', borderRadius: 8, maxWidth: 280, padding: 0, overflow: 'hidden'}}>
  <SidebarHeader title="My App" />
  <Stack gap={0}>
    <SidebarMenuItem label="Dashboard" active />
    <SidebarMenuItem label="Settings" />
    <SidebarMenuItem label="Profile" />
  </Stack>
</Stack>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All Sidebar components accept standard React Native View props.

Variants​

See component props for available variants.

Examples​

Advanced Usage​

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

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.

No related components.

Changelog​

See GitHub Releases for version history.