Sidebar
Provides app-level navigation in a collapsible side panel. Use it to group destinations, actions, and account entries that persist across pages.
React
Figma
Import
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "@kela-systems/ui-components";This page has no live example yet. Storybook shows Sidebar in every state and theme.
Props
Sidebar
| Name | Default | Description |
|---|---|---|
side"start" | "end" | "start" | |
variant"sidebar" | "floating" | "inset" | "sidebar" | |
collapsible"offcanvas" | "icon" | "none" | "offcanvas" |
It also takes the attributes of the HTML element it renders.
SidebarContent
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarFooter
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarGroup
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarGroupAction
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarGroupContent
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarGroupLabel
| Name | Default | Description |
|---|---|---|
size"xs" | "sm" | "xs" |
It also takes the attributes of the HTML element it renders.
SidebarHeader
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarInput
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarInset
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarMenu
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarMenuAction
| Name | Default | Description |
|---|---|---|
showOnHoverboolean | false |
It also takes the attributes of the HTML element it renders.
SidebarMenuBadge
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarMenuButton
| Name | Default | Description |
|---|---|---|
variant"default" | "outline" | "default" | |
size"default" | "sm" | "lg" | "default" | |
isActiveboolean | false | |
tooltipstring | React.ComponentProps<typeof TooltipContent> |
It also takes the attributes of the HTML element it renders.
SidebarMenuItem
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarMenuSkeleton
| Name | Default | Description |
|---|---|---|
showIconboolean | false |
It also takes the attributes of the HTML element it renders.
SidebarMenuSub
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarMenuSubButton
| Name | Default | Description |
|---|---|---|
size"sm" | "default" | "default" | |
isActiveboolean | false |
It also takes the attributes of the HTML element it renders.
SidebarMenuSubItem
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarProvider
| Name | Default | Description |
|---|---|---|
defaultOpenboolean | true | |
openboolean | ||
onOpenChange(open: boolean) => void |
It also takes the attributes of the HTML element it renders.
SidebarRail
No props of its own. It also takes the attributes of the HTML element it renders.
SidebarSeparator
No props of its own. It also takes the props of Base UI's separator.
SidebarTrigger
| Name | Default | Description |
|---|---|---|
variant"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "default" | |
size"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "default" | |
loadingboolean | Shows a spinner and prevents interaction while keeping the variant's resting colors. |
It also takes the props of Base UI's button.
Also exported: useSidebar (hook).