Sidebar

SidebarMenuButton (36px, 24px icon), SidebarMenuSubButton (inset with a 1px guide), SidebarMenuAction and the settings action. surface sidebar keeps the dark navigation in both modes; surface follows the content theme.

Figma: 10 / Components / Sidebar

Usage

Source: src/components/ui/sidebar-menu.tsx
import {
    SidebarMenuAction,
    SidebarMenuActionSettings,
    SidebarMenuButton,
    SidebarMenuSubButton
} from '@/components/ui/sidebar-menu'
<SidebarMenuButton icon={<Users />} label='Supporters' expandable expanded={open} onClick={toggle} />
<SidebarMenuSubButton label='All Supporters' href='/supporters' />
NewNew activity

When to use

When to reach for it, and when to use something else.

Use it for

Complete: The app navigation in AppSidebar.
Complete: surface variant for navigation inside the content area.

Avoid

Not complete: Changing the dark navigation colors in dark mode; the nav stays dark in both.

SidebarMenuButton

PropTypeDefaultDescription
iconReactNode–A 24px icon.
labelReactNode–The item name.
surface'sidebar' | 'surface''sidebar'Dark navigation or content theme.
activebooleanfalseThe current section.
expandablebooleanfalseShows the caret for a group.
expandedbooleanfalseFlips the caret.
hrefstring–Renders a link instead of a button.
trailingReactNode–A badge or NotificationIndicator.

SidebarMenuSubButton

PropTypeDefaultDescription
labelReactNode–The item name.
activebooleanfalseThe current page.
badgeReactNode–For example the Beta badge.

GoodUnited design system. The Figma file is the source of truth for every color, type size and component.

Made with Modulify