InstallComponentsExample

Accordion

Collapsible sections built on the native <details> element. Give them the same name so only one stays open.

How it helpsZero JavaScript. Keyboard, screen readers and find-in-page all work because the browser does the work.

Exclusive group

Is Sidedish really dependency-free?

Yes. One CSS file and one JS file, no build step.

Does it work without JavaScript?

Everything except the four web components and toasts is pure CSS.

Can I change the colours?

Every colour is a CSS variable. Pass it as a prop.

export default function Example() {
  return (
    <>
      <div>
        <details name="faq" open>
          <summary>Is Sidedish really dependency-free?</summary>
          <p>Yes. One CSS file and one JS file, no build step.</p>
        </details>
        <details name="faq">
          <summary>Does it work without JavaScript?</summary>
          <p>Everything except the four web components and toasts is pure CSS.</p>
        </details>
        <details name="faq">
          <summary>Can I change the colours?</summary>
          <p>Every colour is a CSS variable. Pass it as a prop.</p>
        </details>
      </div>
    </>
  );
}
<div>
  <details name="faq" open>
    <summary>Is Sidedish really dependency-free?</summary>
    <p>Yes. One CSS file and one JS file, no build step.</p>
  </details>
  <details name="faq">
    <summary>Does it work without JavaScript?</summary>
    <p>Everything except the four web components and toasts is pure CSS.</p>
  </details>
  <details name="faq">
    <summary>Can I change the colours?</summary>
    <p>Every colour is a CSS variable. Pass it as a prop.</p>
  </details>
</div>

API

NameTypeDescription
details > summarytagOne item.
name="group"attrItems with the same name open one at a time.
openattrStart expanded.