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

Menu

AI Sidebar

Preview

Workspace

Agent workspace

Draft

Selected resource

Review resource sidebar interaction details

Keep the resource tree predictable while files move between projects, labels overflow, and folders expand around the current selection.

Interaction notes

  • Folders only reveal their contents.
  • Files can be selected, moved, or renamed.
  • Rejected moves return to their previous location.

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/ai-sidebar

Import the shared styles once in your application.

TSUsage
import AISidebar from '@/components/beui/agents/AISidebar.vue'
import '@/components/beui/styles.css'

API Reference

v-model:items?
SidebarResource[]
Defaultundefined
defaultItems?
SidebarResource[]
Default[]
onMove?
(move: ResourceMove) => void | Promise<void>

Reject the promise to roll the optimistic move back.

Default—
@move-error?
(error: unknown, move: ResourceMove) => void
Default—
onRename?
(item: SidebarResource, label: string) => void | Promise<void>
Default—
v-model:activeId?
string | null
Defaultundefined
defaultActiveId?
string | null
Defaultnull
@active-change?
(value: string) => void
Default—
defaultExpandedIds?
string[]
Default[]
#renderIcon?
{ item: SidebarResource }

Replaces a row's icon.

Default—
#renderMenu?
{ item: SidebarResource, rename: () => void, close: () => void, moves: SidebarResourceMoveCommands }

Replaces the row menu content; `moves` lists the moves available right now.

Default—
ariaLabel?
string
Default—
class?
string
Default—
labels?
Labels

Override any built-in string.

Default—
@items-change?
(value: SidebarResource[]) => void
Default—

Composition

Place the resource tree inside Animated Sidebar content and keep the selected resource surface in the sibling inset.

AnimatedSidebarProvider
├── AnimatedSidebar
│   ├── AnimatedSidebarContent
│   │   └── AISidebar
│   │       ├── Folder or project
│   │       └── File or bookmark
│   └── AnimatedSidebarRail
└── AnimatedSidebarInset

Note: Message Scroller can fill the inset with the selected conversation. Prompt Input can anchor the composer beneath active resource content.

How it works

An AI sidebar organizes changing workspace resources rather than only routing between fixed destinations. Folder and project rows disclose children, while files and bookmarks become the active resource and can move or rename without destabilizing the surrounding workspace.

Updated