Skip to content
VenusUI
Get started

Snow Globe

A snow globe around any photo: snow drifts gently, and a shake sends a flurry.

Preview

Installation

npx shadcn@latest add @venusui/snow-globe

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/snow-globe.tsx

Usage

The code behind the preview above.

snow-globe-demo.tsx

import { SnowGlobe } from "@/components/ui/snow-globe"

// Photos: Unsplash (free under the Unsplash License).
const photo = (id: string, w: number, h: number) => `https://images.unsplash.com/photo-${id}?w=${w}&h=${h}&fit=crop&auto=format&q=80`

export default function SnowGlobeDemo() {
  return <SnowGlobe src={photo("1464822759023-fed622ff2c3b", 600, 600)} alt="A valley below snowy mountains" label="Alpine 2026" />
}

API reference

PropTypeDefaultDescription
src, altstring—The scene inside.
labelstring"Greetings"Engraved on the base.
flakesnumber40Flakes when still.

All <div> props.

Requirements

  • React 19 and Tailwind CSS v4. The CLI adds the keyframes.

Customization

  • Works with any photo; square crops look best.

Accessibility

  • The globe and Shake are buttons. Reduced motion keeps the snow still.

Troubleshooting

Something looks different from the preview.
Components use your project’s theme tokens, so surrounding colours and radius follow your styles.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (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 found
Run npx shadcn@latest init in your project first.
Loading preview

A card that tilts in 3D toward the pointer with spring physics.

Loading preview

A light that travels around the border of a card or container.

Loading preview

Stacked cards with the next ones peeking out; Next sends the top card to the back.