# Disclosure

> Single disclosure / collapsible section.

Registry name: `disclosure`. HTML docs: https://ui.anuragroy.dev/component/disclosure.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/disclosure.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/disclosure.json`.

Registry JSON: https://ui.anuragroy.dev/r/disclosure.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/disclosure.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import {
  Disclosure,
  DisclosureContent,
  DisclosureTrigger
} from "@/components/ui/disclosure"
```

## Usage

```tsx
import {
  Disclosure,
  DisclosureContent,
  DisclosureTrigger,
} from "@/components/ui/disclosure"

export function Example() {
  return (
    <Disclosure defaultOpen>
      <DisclosureTrigger>Show details</DisclosureTrigger>
      <DisclosureContent>
        Disclosure content expands with a height animation.
      </DisclosureContent>
    </Disclosure>
  )
}
```

## API

### Disclosure

Base UI Collapsible root.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultOpen` | boolean | — |  |
| `open` | boolean | — |  |
| `onOpenChange` | (open: boolean) => void | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/disclosure): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/disclosure.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
