# Reveal

Shows and hides its children by animating their height open and closed. The children mount when it opens and unmount once the close ends; while closing they are frozen and inert. No animation under reduced motion.

## Use for

- content that slides open below a control, such as extra fields
- an inline message or section that appears and disappears

## Practices

- Do: Keep `Reveal` mounted and toggle `open`, so the close can animate.
- Don't: Use it for a section the user toggles with a button. Use `Collapsible` or `Accordion` instead, which wire the trigger.

## API reference

### Reveal

A `div` that carries `data-open` or `data-closed` and the transition attributes. Takes no `render`.

Slot: `cl-reveal`

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `open` | `boolean` |  | Whether the content shows. |

## Examples

### Extra fields

```tsx
<Reveal open={showAdvanced}>
  <AdvancedFields />
</Reveal>
```

## Related

- [Collapsible](/docs/primitives/collapsible.md)
- [Accordion](/docs/primitives/accordion.md)
