Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Animated Sidebar

Preview

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/animated-sidebar

Import the shared styles once in your application.

TSUsage
import AnimatedSidebar from '@/components/beui/layout/AnimatedSidebar.vue'
import '@/components/beui/styles.css'

API Reference

AnimatedSidebarProvider

v-model:open?
boolean

Desktop open state. Leave unset for an uncontrolled sidebar.

Defaultundefined
defaultOpen?
boolean
Defaulttrue
v-model:openMobile?
boolean

Mobile sheet open state. Leave unset for an uncontrolled sheet.

Defaultundefined
defaultOpenMobile?
boolean
Defaultfalse
style?
StyleValue
Default—
labels?
Partial<AnimatedSidebarMessages>

Override any built-in string.

Default—
class?
string
Default—
shortcut?
boolean

Ctrl/Cmd+B toggles the sidebar. Default true.

Defaulttrue
@open-change?
(open: boolean) => void
Default—
@open-mobile-change?
(open: boolean) => void
Default—

AnimatedSidebarMenuSubButton

#icon?
slot

Icon before the label. Defaults to a small dot.

Default—
href?
string
Default—
isActive?
boolean
Defaultfalse
disabled?
boolean
Defaultfalse
closeOnSelect?
boolean
Defaulttrue
target?
SidebarLinkTarget
Default—
rel?
string
Default—
@select?
() => void
Default—
class?
string
Default—
#default?
slot

Label of the row.

Default—

AnimatedSidebarMenuButton

#icon?
slot

Icon before the label. Stays visible in the icon rail.

Default—
badge?
string

Trailing text, for example a count. Hidden in the icon rail.

Default—
href?
string
Default—
isActive?
boolean
Defaultfalse
ariaExpanded?
boolean

Makes the row a disclosure button: the chevron shows and turns with this state.

Defaultundefined
disabled?
boolean
Defaultfalse
closeOnSelect?
boolean
Defaultundefined
target?
SidebarLinkTarget
Default—
rel?
string
Default—
@select?
() => void
Default—
class?
string
Default—
label?
string

Accessible name and tooltip in the icon rail when the label is not plain text.

Default—
#default?
slot

Label of the row.

Default—
#badge?
slot

Trailing content such as a count; replaces `badge`. Hidden in the icon rail.

Default—

AnimatedSidebar

class?
string
Default—
variant?
SidebarVariant

Panel mode: surface style.

Defaultsidebar
side?
SidebarSide

Panel mode: which edge the sidebar sits on.

Defaultleft
collapsible?
SidebarCollapsible
Defaulticon
ariaLabel?
string

Panel mode: accessible name of the sidebar.

Default—
panelClassName?
string

Panel mode: class of the sticky surface inside the width-animated wrapper.

Default—
items?
readonly SidebarDestination[]

Builds the whole shell from data. Leave it out to compose the parts yourself.

Default—
label?
string

Accessible name of the shell in `items` mode.

DefaultWorkspace
shortcut?
boolean
Defaulttrue
v-model?
string
Default—
v-model:open?
boolean
Defaulttrue

AnimatedSidebarTrigger

class?
string
Default—
ariaLabel?
string
Default—
@click?
(event: MouseEvent) => void
Default—

AnimatedSidebarClose

class?
string
Default—
ariaLabel?
string
Default—
@click?
(event: MouseEvent) => void
Default—

AnimatedSidebarRail

class?
string
Default—
ariaLabel?
string
Default—
@click?
(event: MouseEvent) => void
Default—

AnimatedSidebarInset

class?
string
Default—

AnimatedSidebarHeader

class?
string
Default—

AnimatedSidebarContent

class?
string
Default—

AnimatedSidebarFooter

class?
string
Default—

AnimatedSidebarGroup

class?
string
Default—

AnimatedSidebarGroupLabel

class?
string
Default—

AnimatedSidebarGroupContent

class?
string
Default—

AnimatedSidebarMenu

class?
string
Default—

AnimatedSidebarMenuItem

class?
string
Default—

AnimatedSidebarMenuSub

class?
string
Default—
open
boolean
Default—

AnimatedSidebarMenuSubItem

class?
string
Default—

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