Animated Sidebar

A composable application sidebar with morphing nested navigation that folds into an animated icon rail on desktop and becomes a focus-managed sheet on mobile.

Preview

People

Wednesday, July 29

Good morning, Ava.

Your workspace stays in place while the navigation folds down to a focused icon rail.

Active view

People

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/animated-sidebar

API Reference

AnimatedSidebarProvider

open?
boolean
—
defaultOpen?
boolean
true
onOpenChange?
((open: boolean) => void)
—
openMobile?
boolean
—
defaultOpenMobile?
boolean
false
onOpenMobileChange?
((open: boolean) => void)
—
style?
SidebarProviderStyle
—
className?
string
—

AnimatedSidebarMenuSubButton

icon?
ReactNode
—
href?
string
—
isActive?
boolean
false
disabled?
boolean
false
closeOnSelect?
boolean
true
target?
"_self" | "_blank" | "_parent" | "_top"
—
rel?
string
—
onSelect?
(() => void)
—
className?
string
—

AnimatedSidebarMenuButton

icon?
ReactNode
—
badge?
ReactNode
—
href?
string
—
isActive?
boolean
false
ariaExpanded?
boolean
—
disabled?
boolean
false
closeOnSelect?
boolean
—
target?
"_self" | "_blank" | "_parent" | "_top"
—
rel?
string
—
onSelect?
(() => void)
—
className?
string
—

AnimatedSidebar

className?
string
—
side?
"right" | "left"
left
variant?
"inset" | "sidebar" | "floating"
sidebar
collapsible?
"none" | "icon" | "offcanvas"
icon
ariaLabel?
string
Sidebar
panelClassName?
string
—

AnimatedSidebarTrigger

className?
string
—

AnimatedSidebarClose

className?
string
—

AnimatedSidebarRail

className?
string
—

AnimatedSidebarInset

className?
string
—

AnimatedSidebarHeader

className?
string
—

AnimatedSidebarContent

className?
string
—

AnimatedSidebarFooter

className?
string
—

AnimatedSidebarGroup

className?
string
—

AnimatedSidebarGroupLabel

className?
string
—

AnimatedSidebarGroupContent

className?
string
—

AnimatedSidebarMenu

className?
string
—

AnimatedSidebarMenuItem

className?
string
—

AnimatedSidebarMenuSub

className?
string
—
open
boolean
—

AnimatedSidebarMenuSubItem

className?
string
—

Composition

Compose navigation groups inside the sidebar and place the application surface in the sibling inset.

AnimatedSidebarProvider
├── AnimatedSidebar
│   ├── AnimatedSidebarHeader
│   ├── AnimatedSidebarContent
│   │   └── AnimatedSidebarMenu
│   ├── AnimatedSidebarFooter
│   └── AnimatedSidebarRail
└── AnimatedSidebarInset

Note: AI Sidebar composes the shell with editable projects, folders, files, and bookmarks.

How it works

An application sidebar is the responsive shell around persistent navigation. It coordinates desktop collapse, mobile presentation, nested destinations, and the content inset without owning the data rendered inside those regions.

Updated