Sidebar with User Menu
A sidebar with a rich user profile dropdown in the footer.
Sidebar
Avatar
Dropdown Menu
Badge
Preview
Code
<BbSidebarProvider>
<BbSidebar>
<BbSidebarHeader>
<div class="flex items-center gap-2 px-2 h-10">
<div class="flex h-7 w-7 items-center justify-center rounded-md bg-primary text-primary-foreground">
<LucideIcon Name="box" class="h-4 w-4" />
</div>
<span class="text-sm font-semibold">AppStack</span>
</div>
</BbSidebarHeader>
<BbSidebarContent>
<BbSidebarGroup>
<BbSidebarMenu>
<BbSidebarMenuItem>
<BbSidebarMenuButton Href="/" IsActive="true">
<LucideIcon Name="house" class="h-4 w-4" />
<span>Home</span>
</BbSidebarMenuButton>
</BbSidebarMenuItem>
<BbSidebarMenuItem>
<BbSidebarMenuButton Href="/inbox">
<LucideIcon Name="inbox" class="h-4 w-4" />
<span>Inbox</span>
<BbBadge Variant="BadgeVariant.Secondary" Class="ml-auto h-5 px-1.5 text-[10px]">24</BbBadge>
</BbSidebarMenuButton>
</BbSidebarMenuItem>
<!-- More items... -->
</BbSidebarMenu>
</BbSidebarGroup>
</BbSidebarContent>
<BbSidebarFooter>
<BbDropdownMenu>
<BbDropdownMenuTrigger>
<BbButton Variant="ButtonVariant.Ghost" Class="w-full justify-start gap-2 px-2 h-12">
<BbAvatar Size="AvatarSize.Small">
<BbAvatarFallback>MC</BbAvatarFallback>
</BbAvatar>
<div class="flex flex-col items-start text-left flex-1 min-w-0">
<span class="text-sm font-medium truncate">Maria Chen</span>
<span class="text-xs text-muted-foreground truncate">[email protected]</span>
</div>
<LucideIcon Name="chevrons-up-down" class="h-4 w-4 text-muted-foreground" />
</BbButton>
</BbDropdownMenuTrigger>
<BbDropdownMenuContent Side="PopoverSide.Top" Align="PopoverAlign.Start" MatchTriggerWidth="true">
<div class="flex items-center gap-2 p-2">
<BbAvatar Size="AvatarSize.Small">
<BbAvatarFallback>MC</BbAvatarFallback>
</BbAvatar>
<div class="flex flex-col min-w-0">
<span class="text-sm font-medium truncate">Maria Chen</span>
<span class="text-xs text-muted-foreground truncate">[email protected]</span>
</div>
</div>
<BbDropdownMenuSeparator />
<BbDropdownMenuItem>
<LucideIcon Name="sparkles" class="h-4 w-4 mr-2" />
Upgrade to Pro
</BbDropdownMenuItem>
<BbDropdownMenuSeparator />
<BbDropdownMenuItem>
<LucideIcon Name="user" class="h-4 w-4 mr-2" />
Account
</BbDropdownMenuItem>
<BbDropdownMenuItem>
<LucideIcon Name="credit-card" class="h-4 w-4 mr-2" />
Billing
</BbDropdownMenuItem>
<BbDropdownMenuItem>
<LucideIcon Name="bell" class="h-4 w-4 mr-2" />
Notifications
</BbDropdownMenuItem>
<BbDropdownMenuSeparator />
<BbDropdownMenuItem Class="text-destructive">
<LucideIcon Name="log-out" class="h-4 w-4 mr-2" />
Log out
</BbDropdownMenuItem>
</BbDropdownMenuContent>
</BbDropdownMenu>
</BbSidebarFooter>
</BbSidebar>
<BbSidebarInset>
<!-- Your content here -->
</BbSidebarInset>
</BbSidebarProvider>