XiodUI
HomeDocs
OverviewComponentsStyling & CustomizationChangelog

Components

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

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

Accordion

Previous: Agent SkillNext: Agent Steps

A stack of headings that each expand to reveal a section of content.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import {2  Accordion,3  AccordionItem,4  AccordionPanel,5  AccordionTrigger6} from "xiod-ui/accordion";

Anatomy

1<Accordion>2  <AccordionItem>3    <AccordionTrigger />4    <AccordionPanel />5  </AccordionItem>6</Accordion>

API Reference

Detailed documentation of properties and options.

Accordion

Accepts className, style and render, plus every native attribute of the element it renders.

PropTypeDefaultDescription
defaultValue
AccordionValue<any>
–

The uncontrolled value of the item(s) that should be initially expanded.

To render a controlled accordion, use the value prop instead.

disabled
Agent SkillAgent Steps
boolean
false

Whether the component should ignore user interaction.

hiddenUntilFound
boolean
false

Allows 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
false

Whether to keep the element in the DOM while the panel is closed. This prop is ignored when hiddenUntilFound is used.

multiple
boolean
false

Whether multiple items can be open at the same time.

onValueChange
((value: AccordionValue<any>, eventDetails: AccordionRootChangeEventDetails) => void)
–

Event handler called when an accordion item is expanded or collapsed. Provides the new value as an argument.

value
AccordionValue<any>
–

The controlled value of the item(s) that should be expanded.

To render an uncontrolled accordion, use the defaultValue prop instead.

AccordionItem

Accepts className, style and render, plus every native attribute of the element it renders.

PropTypeDefaultDescription
disabled
boolean
false

Whether the component should ignore user interaction.

onOpenChange
((open: boolean, eventDetails: AccordionItemChangeEventDetails) => void)
–

Event handler called when the panel is opened or closed.

value
any
–

A unique value that identifies this accordion item. If no value is provided, a unique ID will be generated automatically. Use when controlling the accordion programmatically, or to set an initial open state.

AccordionPanel

Accepts className, style and render, plus every native attribute of the element it renders.

PropTypeDefaultDescription
hiddenUntilFound
boolean
false

Allows 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
false

Whether to keep the element in the DOM while the panel is closed. This prop is ignored when hiddenUntilFound is used.

AccordionTrigger

Accepts className, style and render, plus every native attribute of the element it renders.

PropTypeDefaultDescription
icon
ReactNode
–

Replaces this icon. Accepts any node; null renders no icon. Takes precedence over IconProvider.

nativeButton
boolean
true

Whether 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>).