UIPackage
Menu

Framework

Change language

Boilerplate repo

Team Switcher Sidebar

blocklayout

Full-featured app sidebar -- collapsible="icon" rail with TeamSwitcher header, primary nav, projects section, secondary nav, and user dropdown footer. Each section ships as a sibling file in the same folder so consumers can edit one piece at a time.

Also available for Vue ->

Installation

$npx shadcn@latest add https://uipkge.dev/r/react/sidebar-02.json
Named registry:npx shadcn@latest add @uipkge-react/sidebar-02Installs to:components/blocks/sidebar-02/

Variants

Loading interactive previews…

Schema

Type aliases exported from this item's source. Use these to shape the data you pass in.

Team
type Team {
  name: string
  logo: LucideIcon | ((props: { className?: string }) => React.ReactElement)
  plan: string
}

Files installed (7)

  • components/blocks/sidebar-02/Sidebar02.tsx2.3 kB
    'use client'
    
    import { BookOpen, Bot, Frame, LifeBuoy, Map, PieChart, Send, Settings2, SquareTerminal } from 'lucide-react'
    import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarRail } from '@/components/ui/sidebar'
    import { NavMain } from './NavMain'
    import { NavProjects } from './NavProjects'
    import { NavSecondary } from './NavSecondary'
    import { NavUser } from './NavUser'
    import { TeamSwitcher } from './TeamSwitcher'
    
    const data = {
      user: {
        name: 'shadcn',
        email: '[email protected]',
      },
      navMain: [
        {
          title: 'Playground',
          url: '#',
          icon: SquareTerminal,
          isActive: true,
          items: [
            { title: 'History', url: '#' },
            { title: 'Starred', url: '#' },
            { title: 'Settings', url: '#' },
          ],
        },
        {
          title: 'Models',
          url: '#',
          icon: Bot,
          items: [
            { title: 'Genesis', url: '#' },
            { title: 'Explorer', url: '#' },
            { title: 'Quantum', url: '#' },
          ],
        },
        {
          title: 'Documentation',
          url: '#',
          icon: BookOpen,
          items: [
            { title: 'Introduction', url: '#' },
            { title: 'Get Started', url: '#' },
            { title: 'Tutorials', url: '#' },
            { title: 'Changelog', url: '#' },
          ],
        },
        {
          title: 'Settings',
          url: '#',
          icon: Settings2,
          items: [
            { title: 'General', url: '#' },
            { title: 'Team', url: '#' },
            { title: 'Billing', url: '#' },
            { title: 'Limits', url: '#' },
          ],
        },
      ],
      navSecondary: [
        { title: 'Support', url: '#', icon: LifeBuoy },
        { title: 'Feedback', url: '#', icon: Send },
      ],
      projects: [
        { name: 'Design Engineering', url: '#', icon: Frame },
        { name: 'Sales & Marketing', url: '#', icon: PieChart },
        { name: 'Travel', url: '#', icon: Map },
      ],
    }
    
    export function Sidebar02() {
      return (
        <Sidebar data-slot="sidebar-02" collapsible="icon">
          <SidebarHeader>
            <TeamSwitcher />
          </SidebarHeader>
          <SidebarContent>
            <NavMain items={data.navMain} />
            <NavProjects projects={data.projects} />
            <NavSecondary items={data.navSecondary} className="mt-auto" />
          </SidebarContent>
          <SidebarFooter>
            <NavUser user={data.user} />
          </SidebarFooter>
          <SidebarRail />
        </Sidebar>
      )
    }
    
  • components/blocks/sidebar-02/TeamSwitcher.tsx4.3 kB
  • components/blocks/sidebar-02/NavMain.tsx2.3 kB
  • components/blocks/sidebar-02/NavProjects.tsx2.7 kB
  • components/blocks/sidebar-02/NavSecondary.tsx1 kB
  • components/blocks/sidebar-02/NavUser.tsx4.8 kB
  • app/sidebar-02-demo/page.tsx1.2 kB

Raw manifest:https://uipkge.dev/r/react/sidebar-02.json