SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

Accordion

A set of expand/collapse sections built on Disclosure, stacked into one divider-separated list.

Can I change plans mid-cycle?

Yes. The new price is prorated to the day, so an upgrade is billed for the rest of the period and a downgrade lands as credit on the next invoice.

What counts as a seat?

Anyone who signs in during the billing period. Invited members who never accept are free, and a member you remove stops counting the same day.

Do you offer refunds?

Within thirty days of the charge, for any reason, back to the original card.

Which payment methods work?

Every major card, plus SEPA direct debit in the EU. Annual plans over ten seats can pay by invoice with net-30 terms.

Legacy metered pricing

Closed to new accounts.

View code
tsx
<Accordion mix={[maxIs("34rem")]}>
	<Accordion.Item name="billing-faq" open>
		<Accordion.Trigger>
			Can I change plans mid-cycle?
			<ChevronDownIcon data-slot="icon" aria-hidden="true" />
		</Accordion.Trigger>
		<Accordion.Content>
			<p>
				Yes. The new price is prorated to the day, so an upgrade is billed for the rest of
				the period and a downgrade lands as credit on the next invoice.
			</p>
		</Accordion.Content>
	</Accordion.Item>
	<Accordion.Item name="billing-faq">
		<Accordion.Trigger>
			What counts as a seat?
			<ChevronDownIcon data-slot="icon" aria-hidden="true" />
		</Accordion.Trigger>
		<Accordion.Content>
			<p>
				Anyone who signs in during the billing period. Invited members who never accept are
				free, and a member you remove stops counting the same day.
			</p>
		</Accordion.Content>
	</Accordion.Item>
	<Accordion.Item name="billing-faq">
		<Accordion.Trigger>
			Do you offer refunds?
			<ChevronDownIcon data-slot="icon" aria-hidden="true" />
		</Accordion.Trigger>
		<Accordion.Content>
			<p>Within thirty days of the charge, for any reason, back to the original card.</p>
		</Accordion.Content>
	</Accordion.Item>
	<Accordion.Item name="billing-faq">
		<Accordion.Trigger>
			Which payment methods work?
			<ChevronDownIcon data-slot="icon" aria-hidden="true" />
		</Accordion.Trigger>
		<Accordion.Content>
			<p>
				Every major card, plus SEPA direct debit in the EU. Annual plans over ten seats can
				pay by invoice with net-30 terms.
			</p>
		</Accordion.Content>
	</Accordion.Item>
	<Accordion.Item name="billing-faq">
		<Accordion.Trigger aria-disabled="true">
			Legacy metered pricing
			<ChevronDownIcon data-slot="icon" aria-hidden="true" />
		</Accordion.Trigger>
		<Accordion.Content>
			<p>Closed to new accounts.</p>
		</Accordion.Content>
	</Accordion.Item>
</Accordion>

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Or copy it into your project to edit it:

Terminal
sdxc ui add accordion

Usage

typescript
import { Accordion } from "@sdxc/ui";

Renders the list's root host: a plain <div> that stacks Accordion.Item sections in normal block flow under one top rule, each drawing the divider below it, so the list reads as one group. A landing FAQ lays two of these in a container-query grid under a LandingHeader, sharing one name across columns so only one item opens at a time.

Composition

The parts the component publishes, each a static property of the host.

  • Accordion
  • Accordion.ItemRenders one section as Disclosure restyled into a flush list row: only a block-end divider survives, and Accordion draws the top rule, so every closed section is the same height.
  • Accordion.TriggerRenders Accordion.TriggerProps.children as the section's label row, spread to opposite ends and underlined on hover.
  • Accordion.ContentRenders Accordion.ContentProps.children as the section's revealed body: Disclosure.Panel running edge to edge like its trigger, with block-end padding and small, muted text sized for supporting copy.

Examples

One section at a time

How do refunds work?

Ask within thirty days of the charge and the full amount goes back to your card.

When does my order ship?

Orders placed before 2 p.m. leave the Acme warehouse the same business day.

View code
tsx
<Accordion>
	<Accordion.Item name="faq" open>
		<Accordion.Trigger>
			How do refunds work?
			<ChevronDownIcon data-slot="icon" aria-hidden="true" />
		</Accordion.Trigger>
		<Accordion.Content>
			<p>Ask within thirty days of the charge and the full amount goes back to your card.</p>
		</Accordion.Content>
	</Accordion.Item>
	<Accordion.Item name="faq">
		<Accordion.Trigger>
			When does my order ship?
			<ChevronDownIcon data-slot="icon" aria-hidden="true" />
		</Accordion.Trigger>
		<Accordion.Content>
			<p>Orders placed before 2 p.m. leave the Acme warehouse the same business day.</p>
		</Accordion.Content>
	</Accordion.Item>
</Accordion>

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeDefaultRequiredDescription
childrenRemixNode—YesOne or more Accordion.Item sections to stack into a list.

Also accepts everything in TagProps<"div">.

Accordion.Item

Also accepts everything in Disclosure.Props.

Accordion.Trigger

Also accepts everything in Disclosure.TriggerProps.

Accordion.Content

Also accepts everything in Disclosure.PanelProps.

@sdxc/ui

Can’t find it? Contact us