• CMSnpm version

    • Overview
    • ContentBuilder
    • InviteUserForm
    • LoginForm
    • RenewPasswordForm
    • WysiwygInput
  • UInpm version

    • Overview
    • Accordion
    • AlertBubble
    • AnnouncementBar
    • Avatar
    • AvatarFileInput
    • Badge
    • Button
    • ButtonGroup
    • ButtonList
    • Calendar
    • Checkbox
    • CheckboxButton
    • CheckboxInput
    • CheckboxList
    • Chip
    • ColorRadio
    • ColorRadioGroup
    • Combobox
    • DatePicker
    • DatePickerInput
    • DateRangePicker
    • DateRangePickerInput
    • DatetimePicker
    • DatetimePickerInput
    • Dialog
    • Dropdown
    • Dropzone
    • ErrorMessage
    • FileInput
    • FlashMessages
    • FormComponent
    • Icon
    • IconButton
    • ImageGallery
    • InfoBox
    • Input
    • Label
    • Layout
    • Lightbox
    • ListItem
    • Loader
    • Lozenge
    • Menu
    • Message
    • Modal
    • ✅ ModalDialog
    • ✅ ModalHeader
    • MultiCombobox
    • MultiSelect
    • Pagination
    • Paper
    • Popover
    • Radio
    • RadioGroup
    • RasterImage
    • Select
    • Switch
    • ✅ Tabs
    • TextInput
    • TextLink
    • Textarea
    • TimePicker
    • TimePickerInput
    • Toggle
    • Tooltip
    • Typography
  • Formnpm version

    • Overview
    • AvatarFileInput
    • CheckboxButton
    • CheckboxInput
    • CheckboxList
    • ColorRadioGroup
    • Combobox
    • DatePickerInput
    • DateRangePickerInput
    • DatetimePickerInput
    • Dropzone
    • FileInput
    • Form
    • FormRenderer
    • GpsInput
    • MoneyInput
    • MultiCombobox
    • MultiSelect
    • NumberInput
    • PasswordInput
    • RadioGroup
    • Select
    • TextInput
    • Textarea
    • TimePickerInput
    • Toggle
  • DataGridnpm version

    • Overview
    • DataGrid
    • DataGridCustomExample
    • ExportButton
    • FilterList
    • Filters
    • FiltersButton
    • FulltextInput
    • HiddenColumns
    • HiddenColumnsButton
    • Pagination
    • RowCounts
    • RowsPerPageSelect
    • SelectedRowsToolbar
    • TableV2
    • ToolbarControl
    • ToolbarCustoms
    • ToolbarTabs
  • Wysiwygnpm version

    • Overview
  • Resizernpm version

    • Overview
  • Routernpm version

    • Overview
  • Corenpm version

    • Overview
  • Core-Reactnpm version

    • Overview
  • DnDnpm version

    • Overview
  • Stylesnpm version

    • Overview
  • Localizenpm version

    • Overview
  • Analyticsnpm version

    • Overview
  • Datepickernpm version

    • Overview
  • Icons-generatornpm version

    • Overview
  • Smart-addressnpm version

    • Overview
  • E2Enpm version

    • Overview
  • E2E-Playwrightnpm version

    • Overview
View source on GitLab

Accordion

Collapsible sections built on the native <details>/<summary> element. Accordion is the container; Accordion.Item is a single expandable row.

When to use

Use Accordion for FAQ-style content or any set of independently collapsible sections. Because it is built on native <details>, items stay expandable/collapsible without JavaScript.

There is no @uxf/form twin — Accordion is a content component, not a form field.

Usage

import { Accordion } from "@uxf/ui/accordion";

<Accordion>
    <Accordion.Item id="item1" title="What is it?">
        First item content
    </Accordion.Item>
    <Accordion.Item id="item2" title="Another question">
        Second item content
    </Accordion.Item>
</Accordion>;

Accordion renders only its Accordion.Item children (other children are ignored). Each item requires a unique id.

Props

Accordion

PropTypeDefaultDescription
childrenReactNode—Required. Accordion.Item elements.
itemOpenBehavior"single" | "multiple"—Grouping mode (see Variants & states).
openIconNameIconName—Default open-state icon for all items (item-level prop wins).
closeIconNameIconName—Default close-state icon for all items (item-level prop wins).
classNamestring—Class on the container.

Accordion.Item

PropTypeDefaultDescription
idstring—Required. Unique id; also used as the React key.
titleReactNode—Required. Summary/header content.
childrenReactNode—Required. Expanded content.
isOpenbooleanfalseRender the item expanded initially.
openIconNameIconName"chevronDown"Icon shown when collapsed.
closeIconNameIconName"chevronUp"Icon shown when expanded.
iconSizenumber16Icon size in px.
namestring—Native <details name> group; items sharing a name open exclusively. Overridden when itemOpenBehavior="multiple".
classNamestring—Class on the <details> element.

Variants & states

  • Default (itemOpenBehavior omitted): each item is an independent <details>, so several items can be open at once. Give two or more items the same name to group them into a native exclusive accordion (opening one closes the others).
  • itemOpenBehavior="multiple": the container assigns all items one shared generated name, grouping them as a native exclusive accordion — only one item is open at a time. A JavaScript fallback closes sibling items on browsers that do not support the <details name> attribute.

Requirements

Import the component stylesheet, plus the Icon stylesheet (the chevrons render an Icon), once in your global CSS:

@import url("@uxf/ui/css/icon.css");
@import url("@uxf/ui/css/accordion.css");

The item title uses the shared @uxf/ui typography layer, which an app sets up once globally:

Also requires the global @uxf/ui token layer, set up once per app — see @uxf/ui setup.

Default
Open in new tab