Theme

Customize appearance

Components

Sidebar

Build persistent navigation with a responsive mobile panel.

View component source ↗

Preview

A minimal example to get started.

Workspace
Your content goes here.

Installation

Install this component and its dependencies in a project initialized with shadcn.

pnpm dlx shadcn@latest add https://ui.hyunjoon.net/r/sidebar.json

Usage

This is the basic example. Use the Code tab above for the selected example. Adjust import aliases to match your project.

import {
  SidebarProvider,
  Sidebar,
  SidebarHeader,
  SidebarContent,
  SidebarMenu,
  SidebarMenuItem,
  SidebarMenuButton,
  SidebarInset,
} from "@/components/ui/sidebar";

export default function Example() {
  return (
    <SidebarProvider className="min-h-56 w-full overflow-hidden rounded-lg border">
      <Sidebar collapsible="none" className="w-40">
        <SidebarHeader className="font-semibold">Workspace</SidebarHeader>
        <SidebarContent>
          <SidebarMenu>
            <SidebarMenuItem>
              <SidebarMenuButton isActive>Projects</SidebarMenuButton>
            </SidebarMenuItem>
            <SidebarMenuItem>
              <SidebarMenuButton>Settings</SidebarMenuButton>
            </SidebarMenuItem>
          </SidebarMenu>
        </SidebarContent>
      </Sidebar>
      <SidebarInset className="justify-center p-4 text-sm text-muted-foreground">
        Your content goes here.
      </SidebarInset>
    </SidebarProvider>
  );
}

API reference

Derived from the installed component types. Native DOM props are also supported where applicable. A dash means no explicit default is documented. Some props depend on the selected mode.

Sidebar
Sidebar properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
side
"left" | "right" | undefined
"left" | "right" | undefined
"left"Preferred edge of the anchor for the popup.
variant
"sidebar" | "floating" | "inset" | undefined
"sidebar" | "floating" | "inset" | undefined
"sidebar"Visual treatment of the component.
collapsible
"none" | "icon" | "offcanvas" | undefined
"none" | "icon" | "offcanvas" | undefined
"offcanvas"Controls how the sidebar collapses.
SidebarContent
SidebarContent properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
SidebarFooter
SidebarFooter properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
SidebarGroup
SidebarGroup properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
SidebarGroupAction
SidebarGroupAction properties
PropTypeDefaultDescription
ref
React.Ref<HTMLButtonElement> | undefined
React.Ref<HTMLButtonElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
disabled
boolean | undefined
boolean | undefined
—Prevents user interaction.
name
string | undefined
string | undefined
—Field name used in form data.
type
"button" | "submit" | "reset" | undefined
"button" | "submit" | "reset" | undefined
—The native input or button behavior.
value
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—The current value when controlled by the application.
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLButtonElement> | undefined
React.FocusEventHandler<HTMLButtonElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLButtonElement> | undefined
React.FocusEventHandler<HTMLButtonElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLButtonElement, Element> | undefined
React.ChangeEventHandler<HTMLButtonElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLButtonElement> | undefined
React.KeyboardEventHandler<HTMLButtonElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLButtonElement> | undefined
React.MouseEventHandler<HTMLButtonElement> | undefined
—Called when the element is activated.
render
React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn…
React.ReactElement<unknown, string | React.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.
SidebarGroupContent
SidebarGroupContent properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
SidebarGroupLabel
SidebarGroupLabel properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
render
React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn…
React.ReactElement<unknown, string | React.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.
SidebarHeader
SidebarHeader properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
SidebarInput
SidebarInput properties
PropTypeDefaultDescription
ref
React.Ref<HTMLInputElement> | undefined
React.Ref<HTMLInputElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
alt
string | undefined
string | undefined
—Accessible text alternative for the image.
checked
boolean | undefined
boolean | undefined
—Current checked state when controlled.
disabled
boolean | undefined
boolean | undefined
—Prevents user interaction.
max
string | number | undefined
string | number | undefined
—Maximum allowed value.
maxLength
number | undefined
number | undefined
—Maximum number of input characters.
min
string | number | undefined
string | number | undefined
—Minimum allowed value.
multiple
boolean | undefined
boolean | undefined
—Allows more than one value to be selected.
name
string | undefined
string | undefined
—Field name used in form data.
placeholder
string | undefined
string | undefined
—Hint shown when the control has no value.
required
boolean | undefined
boolean | undefined
—Whether the user must provide a value before form submission.
src
string | undefined
string | undefined
—URL of the displayed resource.
step
string | number | undefined
string | number | undefined
—Increment between valid values.
type
React.HTMLInputTypeAttribute | undefined
React.HTMLInputTypeAttribute | undefined
—The native input or button behavior.
value
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—The current value when controlled by the application.
onChange
React.ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined
React.ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined
—Called when the underlying form control changes; inspect the event for its value.
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLInputElement> | undefined
React.FocusEventHandler<HTMLInputElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLInputElement> | undefined
React.FocusEventHandler<HTMLInputElement> | undefined
—Called when the control loses focus.
onKeyDown
React.KeyboardEventHandler<HTMLInputElement> | undefined
React.KeyboardEventHandler<HTMLInputElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLInputElement> | undefined
React.MouseEventHandler<HTMLInputElement> | undefined
—Called when the element is activated.
SidebarInset
SidebarInset properties
PropTypeDefaultDescription
ref
React.Ref<HTMLElement> | undefined
React.Ref<HTMLElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLElement> | undefined
React.FocusEventHandler<HTMLElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLElement> | undefined
React.FocusEventHandler<HTMLElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLElement, Element> | undefined
React.ChangeEventHandler<HTMLElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLElement> | undefined
React.KeyboardEventHandler<HTMLElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLElement> | undefined
React.MouseEventHandler<HTMLElement> | undefined
—Called when the element is activated.
SidebarMenu
SidebarMenu properties
PropTypeDefaultDescription
ref
React.Ref<HTMLUListElement> | undefined
React.Ref<HTMLUListElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLUListElement> | undefined
React.FocusEventHandler<HTMLUListElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLUListElement> | undefined
React.FocusEventHandler<HTMLUListElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLUListElement, Element> | undefined
React.ChangeEventHandler<HTMLUListElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLUListElement> | undefined
React.KeyboardEventHandler<HTMLUListElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLUListElement> | undefined
React.MouseEventHandler<HTMLUListElement> | undefined
—Called when the element is activated.
SidebarMenuAction
SidebarMenuAction properties
PropTypeDefaultDescription
ref
React.Ref<HTMLButtonElement> | undefined
React.Ref<HTMLButtonElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
disabled
boolean | undefined
boolean | undefined
—Prevents user interaction.
name
string | undefined
string | undefined
—Field name used in form data.
type
"button" | "submit" | "reset" | undefined
"button" | "submit" | "reset" | undefined
—The native input or button behavior.
value
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—The current value when controlled by the application.
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLButtonElement> | undefined
React.FocusEventHandler<HTMLButtonElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLButtonElement> | undefined
React.FocusEventHandler<HTMLButtonElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLButtonElement, Element> | undefined
React.ChangeEventHandler<HTMLButtonElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLButtonElement> | undefined
React.KeyboardEventHandler<HTMLButtonElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLButtonElement> | undefined
React.MouseEventHandler<HTMLButtonElement> | undefined
—Called when the element is activated.
render
React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn…
React.ReactElement<unknown, string | React.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
boolean | undefined
falseConfigures show on hover; see the accepted type.
SidebarMenuBadge
SidebarMenuBadge properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
SidebarMenuButton
SidebarMenuButton properties
PropTypeDefaultDescription
ref
React.Ref<HTMLButtonElement> | undefined
React.Ref<HTMLButtonElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
disabled
boolean | undefined
boolean | undefined
—Prevents user interaction.
name
string | undefined
string | undefined
—Field name used in form data.
type
"button" | "submit" | "reset" | undefined
"button" | "submit" | "reset" | undefined
—The native input or button behavior.
value
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—The current value when controlled by the application.
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLButtonElement> | undefined
React.FocusEventHandler<HTMLButtonElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLButtonElement> | undefined
React.FocusEventHandler<HTMLButtonElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLButtonElement, Element> | undefined
React.ChangeEventHandler<HTMLButtonElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLButtonElement> | undefined
React.KeyboardEventHandler<HTMLButtonElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLButtonElement> | undefined
React.MouseEventHandler<HTMLButtonElement> | undefined
—Called when the element is activated.
render
React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn…
React.ReactElement<unknown, string | React.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
boolean | undefined
falseMarks this item as the current page or selection.
tooltip
string | (TooltipPopupProps & Pick<TooltipPositionerProps, "align" | "side" | "sideOffset"…
string | (TooltipPopupProps & Pick<TooltipPositionerProps, "align" | "side" | "sideOffset" | "alignOffset">) | undefined
—Tooltip content shown for the collapsed sidebar item.
variant
"default" | "outline" | null | undefined
"default" | "outline" | null | undefined
"default"Visual treatment of the component.
size
"default" | "sm" | "lg" | null | undefined
"default" | "sm" | "lg" | null | undefined
"default"Visual size of the component.
SidebarMenuItem
SidebarMenuItem properties
PropTypeDefaultDescription
ref
React.Ref<HTMLLIElement> | undefined
React.Ref<HTMLLIElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
value
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—The current value when controlled by the application.
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLLIElement> | undefined
React.FocusEventHandler<HTMLLIElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLLIElement> | undefined
React.FocusEventHandler<HTMLLIElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLLIElement, Element> | undefined
React.ChangeEventHandler<HTMLLIElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLLIElement> | undefined
React.KeyboardEventHandler<HTMLLIElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLLIElement> | undefined
React.MouseEventHandler<HTMLLIElement> | undefined
—Called when the element is activated.
SidebarMenuSkeleton
SidebarMenuSkeleton properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
showIcon
boolean | undefined
boolean | undefined
falseConfigures show icon; see the accepted type.
SidebarMenuSub
SidebarMenuSub properties
PropTypeDefaultDescription
ref
React.Ref<HTMLUListElement> | undefined
React.Ref<HTMLUListElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLUListElement> | undefined
React.FocusEventHandler<HTMLUListElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLUListElement> | undefined
React.FocusEventHandler<HTMLUListElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLUListElement, Element> | undefined
React.ChangeEventHandler<HTMLUListElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLUListElement> | undefined
React.KeyboardEventHandler<HTMLUListElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLUListElement> | undefined
React.MouseEventHandler<HTMLUListElement> | undefined
—Called when the element is activated.
SidebarMenuSubButton
SidebarMenuSubButton properties
PropTypeDefaultDescription
ref
React.Ref<HTMLAnchorElement> | undefined
React.Ref<HTMLAnchorElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
href
string | undefined
string | undefined
—Destination URL for the link.
target
React.HTMLAttributeAnchorTarget | undefined
React.HTMLAttributeAnchorTarget | undefined
—Browsing context in which the link opens.
type
string | undefined
string | undefined
—The native input or button behavior.
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLAnchorElement> | undefined
React.FocusEventHandler<HTMLAnchorElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLAnchorElement> | undefined
React.FocusEventHandler<HTMLAnchorElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLAnchorElement, Element> | undefined
React.ChangeEventHandler<HTMLAnchorElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLAnchorElement> | undefined
React.KeyboardEventHandler<HTMLAnchorElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLAnchorElement> | undefined
React.MouseEventHandler<HTMLAnchorElement> | undefined
—Called when the element is activated.
render
React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn…
React.ReactElement<unknown, string | React.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
"sm" | "md" | undefined
"md"Visual size of the component.
isActive
boolean | undefined
boolean | undefined
falseMarks this item as the current page or selection.
SidebarMenuSubItem
SidebarMenuSubItem properties
PropTypeDefaultDescription
ref
React.Ref<HTMLLIElement> | undefined
React.Ref<HTMLLIElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
value
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—The current value when controlled by the application.
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLLIElement> | undefined
React.FocusEventHandler<HTMLLIElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLLIElement> | undefined
React.FocusEventHandler<HTMLLIElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLLIElement, Element> | undefined
React.ChangeEventHandler<HTMLLIElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLLIElement> | undefined
React.KeyboardEventHandler<HTMLLIElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLLIElement> | undefined
React.MouseEventHandler<HTMLLIElement> | undefined
—Called when the element is activated.
SidebarProvider
SidebarProvider properties
PropTypeDefaultDescription
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLDivElement> | undefined
React.FocusEventHandler<HTMLDivElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
React.ChangeEventHandler<HTMLDivElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLDivElement> | undefined
React.KeyboardEventHandler<HTMLDivElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLDivElement> | undefined
React.MouseEventHandler<HTMLDivElement> | undefined
—Called when the element is activated.
defaultOpen
boolean | undefined
boolean | undefined
trueWhether content starts open when uncontrolled.
open
boolean | undefined
boolean | undefined
—Controls whether the content is open.
onOpenChange
((open: boolean) => void) | undefined
((open: boolean) => void) | undefined
—Called when the open state changes. Use it to update controlled state.
SidebarRail
SidebarRail properties
PropTypeDefaultDescription
ref
React.Ref<HTMLButtonElement> | undefined
React.Ref<HTMLButtonElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
disabled
boolean | undefined
boolean | undefined
—Prevents user interaction.
name
string | undefined
string | undefined
—Field name used in form data.
type
"button" | "submit" | "reset" | undefined
"button" | "submit" | "reset" | undefined
—The native input or button behavior.
value
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—The current value when controlled by the application.
defaultChecked
boolean | undefined
boolean | undefined
—Initial checked state for an uncontrolled control.
defaultValue
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—Initial value for an uncontrolled component.
className
string | undefined
string | undefined
—Additional CSS classes merged with the component styles.
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
React.FocusEventHandler<HTMLButtonElement> | undefined
React.FocusEventHandler<HTMLButtonElement> | undefined
—Called when the control receives focus.
onBlur
React.FocusEventHandler<HTMLButtonElement> | undefined
React.FocusEventHandler<HTMLButtonElement> | undefined
—Called when the control loses focus.
onChange
React.ChangeEventHandler<HTMLButtonElement, Element> | undefined
React.ChangeEventHandler<HTMLButtonElement, Element> | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
React.KeyboardEventHandler<HTMLButtonElement> | undefined
React.KeyboardEventHandler<HTMLButtonElement> | undefined
—Called when a key is pressed while this element is focused.
onClick
React.MouseEventHandler<HTMLButtonElement> | undefined
React.MouseEventHandler<HTMLButtonElement> | undefined
—Called when the element is activated.
SidebarSeparator
SidebarSeparator properties
PropTypeDefaultDescription
orientation
Orientation | undefined
Orientation | undefined
'horizontal'The orientation of the separator.
ref
React.Ref<HTMLDivElement> | undefined
React.Ref<HTMLDivElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
((event: BaseUIEvent<React.FocusEvent<HTMLDivElement, Element>>) => void) | undefined
((event: BaseUIEvent<React.FocusEvent<HTMLDivElement, Element>>) => void) | undefined
—Called when the control receives focus.
onBlur
((event: BaseUIEvent<React.FocusEvent<HTMLDivElement, Element>>) => void) | undefined
((event: BaseUIEvent<React.FocusEvent<HTMLDivElement, Element>>) => void) | undefined
—Called when the control loses focus.
onChange
((event: BaseUIEvent<React.ChangeEvent<HTMLDivElement, Element>>) => void) | undefined
((event: BaseUIEvent<React.ChangeEvent<HTMLDivElement, Element>>) => void) | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
((event: BaseUIEvent<React.KeyboardEvent<HTMLDivElement>>) => void) | undefined
((event: BaseUIEvent<React.KeyboardEvent<HTMLDivElement>>) => void) | undefined
—Called when a key is pressed while this element is focused.
onClick
((event: BaseUIEvent<React.MouseEvent<HTMLDivElement, MouseEvent>>) => void) | undefined
((event: BaseUIEvent<React.MouseEvent<HTMLDivElement, MouseEvent>>) => void) | undefined
—Called when the element is activated.
className
string | ((state: SeparatorState) => string | undefined) | undefined
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
React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn…
React.ReactElement<unknown, string | React.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
React.CSSProperties | ((state: SeparatorState) => React.CSSProperties | undefined) | undef…
React.CSSProperties | ((state: SeparatorState) => React.CSSProperties | undefined) | undefined
—Style applied to the element, or a function that returns a style object based on the component's state.
SidebarTrigger
SidebarTrigger properties
PropTypeDefaultDescription
focusableWhenDisabled
boolean | undefined
boolean | undefined
falseWhether the button should be focusable when disabled.
nativeButton
boolean | undefined
boolean | undefined
trueWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).
ref
React.Ref<HTMLButtonElement> | undefined
React.Ref<HTMLButtonElement> | undefined
—Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
id
string | undefined
string | undefined
—Unique identifier used to associate labels and descriptions.
children
React.ReactNode
React.ReactNode
—Content rendered inside this component.
onFocus
((event: BaseUIEvent<React.FocusEvent<HTMLButtonElement, Element>>) => void) | undefined
((event: BaseUIEvent<React.FocusEvent<HTMLButtonElement, Element>>) => void) | undefined
—Called when the control receives focus.
onBlur
((event: BaseUIEvent<React.FocusEvent<HTMLButtonElement, Element>>) => void) | undefined
((event: BaseUIEvent<React.FocusEvent<HTMLButtonElement, Element>>) => void) | undefined
—Called when the control loses focus.
onChange
((event: BaseUIEvent<React.ChangeEvent<HTMLButtonElement, Element>>) => void) | undefined
((event: BaseUIEvent<React.ChangeEvent<HTMLButtonElement, Element>>) => void) | undefined
—Called when the underlying form control changes; inspect the event for its value.
onKeyDown
((event: BaseUIEvent<React.KeyboardEvent<HTMLButtonElement>>) => void) | undefined
((event: BaseUIEvent<React.KeyboardEvent<HTMLButtonElement>>) => void) | undefined
—Called when a key is pressed while this element is focused.
onClick
((event: BaseUIEvent<React.MouseEvent<HTMLButtonElement, MouseEvent>>) => void) | undefine…
((event: BaseUIEvent<React.MouseEvent<HTMLButtonElement, MouseEvent>>) => void) | undefined
—Called when the element is activated.
disabled
boolean | undefined
boolean | undefined
—Prevents user interaction.
name
string | undefined
string | undefined
—Field name used in form data.
type
"button" | "submit" | "reset" | undefined
"button" | "submit" | "reset" | undefined
—The native input or button behavior.
value
string | number | readonly string[] | undefined
string | number | readonly string[] | undefined
—The current value when controlled by the application.
className
string | ((state: ButtonState) => string | undefined) | undefined
string | ((state: ButtonState) => string | undefined) | undefined
—CSS class applied to the element, or a function that returns a class based on the component's state.
render
React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn…
React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState> | 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
React.CSSProperties | ((state: ButtonState) => React.CSSProperties | undefined) | undefine…
React.CSSProperties | ((state: ButtonState) => React.CSSProperties | undefined) | undefined
—Style applied to the element, or a function that returns a style object based on the component's state.
variant
"link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined
"link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined
—Visual treatment of the component.
size
"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undef…
"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined
—Visual size of the component.

Usage notes

Wrap the layout in SidebarProvider. Use SidebarInset for the main content and SidebarTrigger when the navigation can collapse.