Skip to content
Storybook

Accordion

Disclosure rows for FAQs and settings groups, built on native <details>.

Preview

React · live from the Storybook

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.

Can I change my plan later?
Yes. You can upgrade or downgrade at any time from Settings → Billing.
Is there a free trial?
Pixels Audit is free while we are in early access.
Do you support RTL?
Every component mirrors with dir="rtl" and the Locale tokens switch to Arabic type.

Usage

  • Keep titles as questions or clear nouns.

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

API reference

Class / attributeTypeDescription
px-accordionclassContainer. data-px-accordion="single" keeps one open.
px-accordion__itemclass<details> element.
px-accordion__trigger · __panelclass<summary> and content.

Figma properties

Accordion item12 variants · page “Data display”Open

Disclosure row for FAQs and settings groups. Header is a <button aria-expanded> controlling the panel; stack items to make an Accordion.

PropertyTypeValues
TitleText“Can I change my plan later?”
ContentText“Yes. You can upgrade or downgrade at any time from Settings → Billing. Changes take effect at the start of your next billing cycle.”
ExpandedVariantFalse True
StateVariantActive Hover Focused
DirectionVariantLTR RTL

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-accordion-background-hovercolor-background-neutral-default#f2f4f7
--px-accordion-padding-xspacing-2020px
--px-accordion-padding-yspacing-1616px
--px-accordion-gapspacing-1616px

Accessibility

  • Native details/summary is keyboard and screen-reader ready.