Slide-CN

Reveal

Hide content behind a card flip, reveal it on click.

Overview

Wrap any content in Reveal to hide it until clicked. It flips like a card to uncover what's underneath — axis is picked automatically based on the content shape (landscape flips top-to-bottom, portrait flips left-to-right).

Installation

pnpm dlx shadcn@latest add @slide-cn/reveal
npx shadcn@latest add @slide-cn/reveal
yarn dlx shadcn@latest add @slide-cn/reveal
bunx --bun shadcn@latest add @slide-cn/reveal

Demo

Click on the card below to reveal its content

Click to reveal
Secret Content
This content was hidden until you clicked!

🎉 You revealed it! Click to reveal uses a 3D card flip to uncover content.

Usage

<Reveal>
  This content will be hidden until clicked
</Reveal>

Reference

Prop

Type

Built by Prithvi. Code is available on GitHub

On this page