Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Navigation

Accordion <pm-accordion>

Accordion. With single, opening one item closes the others.

Full screen
Ships in 2–3 business days. Free returns within 30 days. Warranty2 yearsTwo years, worldwide.

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/accordion'; import '@prismora/elements/badge'; </script> <pm-accordion single> <pm-accordion-item heading="Shipping" open>Ships in 2–3 business days.</pm-accordion-item> <pm-accordion-item heading="Returns">Free returns within 30 days.</pm-accordion-item> <pm-accordion-item> <span slot="heading" class="pm-cluster"> Warranty <pm-badge tone="success">2 years</pm-badge> </span> Two years, worldwide. </pm-accordion-item> </pm-accordion>

Attributes

AttributeTypeDefaultDescription
singlebooleanfalseOnly one item open at a time.

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

<pm-accordion-item>

Accordion item built on <details> (find-in-page and keyboard for free).

Attributes

AttributeTypeDefaultDescription
headingstring—Title text.
openbooleanfalseWhether it is open. Set to open or close it; changes when the user opens or closes it.
disabledbooleanfalseCannot be opened or closed by the user (its current state stays).

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Events

EventReact / Svelte propDescription
pm-toggleonPmToggleThe item opened or closed.

Slots

SlotDescription
(default)The content that opens.
headingRich heading (text with a badge or an icon), instead of the heading attribute.

CSS parts

PartDescription
::part(base)The <details> element.
::part(summary)The row that opens and closes the item.
::part(content)The content that opens.

Used in templates

Pricing plansLanding pageHelp centreServer error (500)