Black Friday · Save 40% on Intent UI Design licenses with code UI2026.· 2 days left

Disclosure

Loading...

Installation

Add the component with the CLI.

npx shadcn@latest add @intentui/disclosure-group

Manual installation

Install the dependencies, then copy the component source into your project.

npm install react-aria-components @heroicons/react cn

Anatomy

import { Disclosure, DisclosurePanel, DisclosureTrigger } from "@/components/ui/disclosure-group";
<Disclosure>
  <DisclosureTrigger>
    Trigger
  </DisclosureTrigger>
  <DisclosurePanel>
    Content
  </DisclosurePanel>
</Disclosure>

Examples

Disabled

Set isDisabled to disable the disclosure.

Loading...

Controlled

You can control the disclosure by using the isExpanded prop.

Loading...

Accordion

If you're looking for a more advanced accordion, check out the Disclosure Group component.

Component API

Disclosure

Disclosure extends the React Aria Components <Disclosure> component.

classNamestring

DisclosureGroup

DisclosureGroup extends the React Aria Components <DisclosureGroup> component.

classNamestring

DisclosureIndicator

DisclosureIndicator extends the native <span> element.

classNamestring

DisclosurePanel

DisclosurePanel extends the React Aria Components <DisclosurePanel> component.

classNamestring

DisclosureTrigger

DisclosureTrigger extends the React Aria Components <Button> component.

classNamestring
triggerIndicatorboolean
Default: true

See the React Aria for the full API reference.

Design