Skip to content

Disclosure

Shows and hides extra content.

import { Disclosure } from '@/design-system';

Examples

import { Disclosure } from '@/design-system';

export default function DisclosureBasic() {
  return (
    <Disclosure summary="What is included?">
      <p>Everything in the plan, with no setup fee.</p>
    </Disclosure>
  );
}

How it works

  • It is a button with aria-expanded, so Enter and Space work.
  • Hidden content stays in the page but is not shown or read.

Props

Disclosure takes only these props.

Disclosure props
PropTypeDefaultDescription
summaryReactNoderequiredThe button text.
childrenReactNoderequiredThe content.
defaultOpenbooleanfalseStarts open.
classNamestring—Extra classes, for spacing or width.