Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A media card whose details slide up on hover or keyboard focus.
npx shadcn@latest add @venusui/reveal-cardRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/reveal-card.tsxThe code behind the preview above.
reveal-card-demo.tsx
import { RevealCard } from "@/components/ui/reveal-card"
export default function RevealCardDemo() {
return (
<RevealCard
title="Mountain cabin"
media={<div className="size-full bg-linear-to-br from-muted to-muted-foreground/30" />}
>
<p>Two bedrooms, wood stove, and a view of the valley. Available from March.</p>
<a href="#" className="mt-3 inline-block font-medium text-foreground underline underline-offset-4">
View details
</a>
</RevealCard>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| media | ReactNode | — | Image, video or illustration at the top. Required. |
| title | ReactNode | — | Always-visible title. Required. |
| children | ReactNode | — | Details revealed on hover or focus. Required. |
All <article> props, including className.
cn helper at @/lib/utils. Works in Server Components (no JavaScript needed).aspect-[4/3] in the file for other ratios.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A card that tilts in 3D toward the pointer with spring physics.
A flight boarding pass with a perforated stub and code that flips to the fare and baggage details.
Stacked cards with the next ones peeking out; Next sends the top card to the back.