GitHub

Accordion

Collapsible content sections using native <details> element. No JavaScript required.

Basic

What is UX?
UX is a zero-dependency, framework-agnostic CSS component library with iOS-style design.
How do I install it?
Just add the CSS file to your project. No build step required.
Does it work with React?
Yes! It works with any framework — React, Vue, HTMX, or vanilla HTML.

Exclusive (one open at a time)

Section One
Only one section open at a time. Click another to close this one.
Section Two
This section automatically closes the previous one.
Section Three
Native HTML exclusive behavior — no JavaScript needed.

Arrow (CSS-only, no SVG needed)

Account Settings
Manage your account preferences and profile information.
Privacy & Security
Configure privacy settings and two-factor authentication.
Notifications
Choose which notifications you want to receive.

Plus/Minus (CSS-only, no SVG needed)

What payment methods do you accept?
We accept all major credit cards, PayPal, and bank transfers.
How long does shipping take?
Standard shipping takes 3-5 business days. Express is 1-2 days.
Can I return my order?
Yes, you have 30 days to return any unused item for a full refund.

Outline Variant

Section One
Content for section one.
Section Two
Content for section two.

Flat (Separated)

Account Settings
Manage your account preferences and profile information.
Privacy & Security
Configure privacy settings and two-factor authentication.

Classes Reference

Class Description
.accordionContainer
.accordion-itemItem (use on <details>)
.accordion-headerClick target (use on <summary>)
.accordion-titleTitle text
.accordion-subtitleSubtitle text
.accordion-chevronChevron icon (auto-rotates on open)
.accordion-iconLeading icon
.accordion-bodyCollapsible content
.accordion-arrowCSS-only arrow indicator (no SVG needed)
.accordion-plusCSS-only +/− indicator (no SVG needed)
.accordion-outlineBordered variant
.accordion-flatSeparated items
.accordion-insetiOS grouped margin
.accordion-smSmall size
.accordion-lgLarge size
name="..."Add same name to <details> for exclusive mode (one open at a time)