Skip to content
Mosaic
On this page

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

GuidancePractice
DoKeep Reveal mounted and toggle open, so the close can animate.
Don’tUse 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

PropTypeDescription
openbooleanWhether the content shows.

Examples

Extra fields

TSX
<Reveal open={showAdvanced}>
  <AdvancedFields />
</Reveal>