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

Collapsible

Previous: Circular ProgressNext: Color Picker

An interactive component which expands/collapses a panel.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import {2  Collapsible,3  CollapsibleContent,4  CollapsiblePanel,5  CollapsibleTrigger6} from "xiod-ui/collapsible";

Anatomy

1<Collapsible>2  <CollapsibleTrigger />3  <CollapsibleContent>4    <CollapsiblePanel />5  </CollapsibleContent>6</Collapsible>

API Reference

Detailed documentation of properties and options.

Collapsible

PropTypeDefaultDescription
open
boolean
|undefined
-Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `defaultOpen` prop instead.
defaultOpen
boolean
|undefined
falseWhether the collapsible panel is initially open. To render a controlled collapsible, use the `open` prop instead.
onOpenChange
((open: boolean, eventDetails: CollapsibleRootChangeEventDetails) => void)
|undefined
-Event handler called when the panel is opened or closed.
disabled
boolean
|undefined
falseWhether the component should ignore user interaction.
className
string
|((state: CollapsibleRootState) => 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, CollapsibleRootState>
|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: CollapsibleRootState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

CollapsiblePanel

PropTypeDefaultDescription
hiddenUntilFound
boolean
|undefined
falseAllows the browser's built-in page search to find and expand the panel contents. Overrides the `keepMounted` prop and uses `hidden="until-found"` to hide the element without removing it from the DOM.
keepMounted
boolean
|undefined
falseWhether to keep the element in the DOM while the panel is hidden. This prop is ignored when `hiddenUntilFound` is used.
className
string
|((state: CollapsiblePanelState) => 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, CollapsiblePanelState>
|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: CollapsiblePanelState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

CollapsibleTrigger

PropTypeDefaultDescription
nativeButton
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>`).
className
string
|((state: CollapsibleTriggerState) => 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, CollapsibleTriggerState>
|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: CollapsibleTriggerState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.
Circular ProgressColor Picker