XiodUI
HomeDocs
OverviewComponentsThemes & ColorsChangelog
⌘ K

Components

  • Accordion
  • Agent Steps
    New
  • Alert
  • Alert Dialog
  • Aspect Ratio
    New
  • Autocomplete
  • Avatar
  • Badge
  • Breadcrumb
  • Button
    Updated
  • Button Group
    New
  • Button Split
    New
  • Calendar
    New
  • Card
  • Carousel
    New
  • Checkbox
  • Circular Progress
    New
  • Collapsible
  • Color Picker
    New
  • Combobox
  • Command
  • Context Menu
    New
  • Copy To Clipboard
    New
  • Corner Badge
    New
  • Dashboard Grid
    New
  • Date Picker
    New
  • Dialog
  • Dot Matrix
    New
  • Draggable
    New
  • Drawer
    New
  • Empty
  • Field
  • Fieldset
  • File Upload
    New
  • Form
  • Frame
  • Gauge
    New
  • Grid
    New
  • Group
  • Input
  • Input Group
  • Input OTP
    New
  • Input Payment
    New
  • Input Phone
    New
  • Input Sensitive
    New
  • Kbd
  • Kinetic Click
    New
  • Label
  • List Box
    New
  • Loader
  • Marker
    New
  • Menu
  • Menubar
  • Message
    New
  • Meter
  • Morphic Toast
    New
  • Navigation Menu
  • Number Field
  • Option Picker
    New
  • Orb
    New
  • Pagination
  • Popover
  • Preview Card
  • Progress
  • Radio
  • Resizable
    New
  • Ruler Picker
    New
  • Scroll Area
  • Scroll Bar
    New
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
    Updated
  • Sortable
    New
  • Switch
    Updated
  • Table
  • Tabs
  • Text
    New
  • Textarea
  • Timeline
    New
  • Toast
  • Toggle
  • Toggle Group
  • Toolbar
  • Tooltip
    Updated
  • Waveform
    New
  • Wheel Picker
    New
/
/

Loading...

Preview Skeleton

Installation Skeleton

Usage Skeleton

API Reference Skeleton

Sponsors

Support the development of XiodUI and help us build the best component library on Earth.

+++
Sponsor on GitHub

Sidebar

Previous: SeparatorNext: Skeleton

A collapsible vertical panel often used to organize navigation links.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import {2  Sidebar,3  SidebarContent,4  SidebarFooter,5  SidebarGroup,6  SidebarGroupAction,7  SidebarGroupContent,8  SidebarGroupLabel,9  SidebarHeader,10  SidebarInput,11  SidebarInset,12  SidebarMenu,13  SidebarMenuAction,14  SidebarMenuBadge,15  SidebarMenuButton,16  SidebarMenuItem,17  SidebarMenuSkeleton,18  SidebarMenuSub,19  SidebarMenuSubButton,20  SidebarMenuSubItem,21  SidebarProvider,22  SidebarRail,23  SidebarSeparator,24  SidebarTrigger25} from "xiod-ui/sidebar";

Anatomy

1<Sidebar>2  <SidebarInput />3  <SidebarTrigger />4  <SidebarContent>5    <SidebarHeader>6      <SidebarGroupLabel />7    </SidebarHeader>8    <SidebarGroup>9      <SidebarMenuItem />10      <SidebarMenuSubItem />11    </SidebarGroup>12    <SidebarGroupContent />13    <SidebarInset />14    <SidebarMenu />15    <SidebarMenuBadge />16    <SidebarMenuButton />17    <SidebarMenuSkeleton />18    <SidebarMenuSub />19    <SidebarMenuSubButton />20    <SidebarProvider />21    <SidebarRail />22    <SidebarSeparator />23    <SidebarFooter>24      <SidebarGroupAction />25      <SidebarMenuAction />26    </SidebarFooter>27  </SidebarContent>28</Sidebar>

API Reference

Detailed documentation of properties and options.

Sidebar

PropTypeDefaultDescription
side
"left"
|"right"
|undefined
left
variant
"modal"
|"inset"
|"sidebar"
|"floating"
|undefined
sidebar
collapsible
"none"
|"icon"
|"offcanvas"
|undefined
offcanvas

SidebarGroupAction

PropTypeDefaultDescription
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, {}>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.

SidebarGroupLabel

PropTypeDefaultDescription
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, {}>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.

SidebarInput

PropTypeDefaultDescription
defaultValue
string
|number
|readonly string[]
|undefined
-The default value of the input. Use when uncontrolled.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, InputState>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
value
string
|number
|readonly string[]
|undefined
-The value of the input. Use when controlled.
onValueChange
((value: string, eventDetails: { reason: "none"; event: Event; cancel: () => void; allowPropagation: () => void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element
|undefined; }) => void)
|undefined
-Callback fired when the `value` changes. Use when controlled.
size
number
|"default"
|"sm"
|"lg"
|undefined
default
unstyled
boolean
|undefined
-
nativeInput
boolean
|undefined
-
className
string
|undefined
-
style
CSSProperties
|undefined
-

SidebarMenuAction

PropTypeDefaultDescription
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, {}>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
showOnHover
boolean
|undefined
false

SidebarMenuButton

PropTypeDefaultDescription
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, {}>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
isActive
boolean
|undefined
false
tooltip
string
|(TooltipPopupProps & { align?: Align
|undefined; side?: Side
|undefined; sideOffset?: number
|OffsetFunction
|undefined; anchor?: Element
|... 4 more ...
|undefined; hideArrow?: boolean
|undefined; })
|undefined
-
size
"default"
|"sm"
|"lg"
|null
|undefined
default
variant
"default"
|"outline"
|null
|undefined
default

SidebarMenuSkeleton

PropTypeDefaultDescription
showIcon
boolean
|undefined
false

SidebarMenuSubButton

PropTypeDefaultDescription
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, {}>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
size
"sm"
|"md"
|undefined
md
isActive
boolean
|undefined
false

SidebarProvider

PropTypeDefaultDescription
defaultOpen
boolean
|undefined
true
open
boolean
|undefined
-
onOpenChange
((open: boolean) => void)
|undefined
-

SidebarSeparator

PropTypeDefaultDescription
orientation
Orientation
|undefined
verticalThe orientation of the separator.
className
string
|((state: SeparatorState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, SeparatorState>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
style
CSSProperties
|((state: SeparatorState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

SidebarTrigger

PropTypeDefaultDescription
variant
"default"
|"link"
|"secondary"
|"destructive"
|"destructive-outline"
|"ghost"
|"outline"
|null
|undefined
default
size
"default"
|"sm"
|"lg"
|"xs"
|"xl"
|"icon"
|"icon-lg"
|"icon-sm"
|"icon-xl"
|"icon-xs"
|null
|undefined
default
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, {}>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
SeparatorSkeleton