Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A magnifying glass that follows the pointer over a photo and enlarges what's under it.
npx shadcn@latest add @venusui/magnifier-loupeRun 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/magnifier-loupe.tsxThe code behind the preview above.
magnifier-loupe-demo.tsx
import { MagnifierLoupe } from "@/components/ui/magnifier-loupe"
// 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 MagnifierLoupeDemo() {
return <MagnifierLoupe src={photo("1523906834658-6e24ef2386f9", 1600, 1200)} alt="The Rialto Bridge over the Grand Canal in Venice" caption="Look closer: boats, windows and shutters." />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| src, alt | string | — | The photo. |
| zoom | number | 2.5 | How much the lens enlarges. |
| lens | number | 168 | Lens diameter in pixels. |
| caption | string | — | Shown under the photo. |
All <figure> props.
zoom times its displayed size.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.