DocsComponentsTemplatesThemesGitHub

Sidebar

App navigation column with sections, counts and colored team dots.

Code

import * as React from 'react';
import { Sidebar } from '@fruit-labs/design';

export default function Demo() {
  return (
    <Sidebar
      header="Orchard"
      sections={[
        {
          items: [
            {
              label: 'Home',
              icon: 'home',
              active: true,
            },
            {
              label: 'Projects',
              icon: 'grid',
              count: 28,
            },
            {
              label: 'Reports',
              icon: 'chart',
            },
            {
              label: 'Inbox',
              icon: 'bell',
              count: 3,
            },
          ],
        },
        {
          title: 'Teams',
          items: [
            {
              label: 'Design',
              color: 'var(--fruit-grape)',
            },
            {
              label: 'Engineering',
              color: 'var(--fruit-kiwi)',
            },
          ],
        },
      ]}
    />
  );
}

Install

From npm:

npm install @fruit-labs/design

import { Sidebar } from '@fruit-labs/design';

Or copy the TypeScript source into your project:

npx shadcn@latest add https://design.fruitlabs.online/r/sidebar.json

Guidelines

  • 240–280 wide. Collapse to icons or a drawer below 960px.

Props

PropTypeRequired
headerReact.ReactNodeNo
itemsSidebarItem[]No
sectionsArray<{ title?: string; items: SidebarItem[] }>No
glassbooleanNo
labelstringNo
classNamestringNo
styleReact.CSSPropertiesNo
childrenReact.ReactNodeNo

Edit this example on GitHub