shadcn.io is an independent project built on shadcn/ui
On this page7 sections
3D Pin is a card that leans back under the pointer or keyboard focus, as if a pin had been dropped on it: a line of light rises from its middle to a small label, and rings spread around its base. With an href, the whole card is one link named by that label.
Use it to point at one thing, such as a featured project or a stand on a floor plan. For a card that turns to follow the pointer, there's 3D Card.
Installation
Anatomy

Usage
import { Pin3D } from "@/components/ui/pin-3d";Pass title whenever you pass href: it is the label on the pin and the name a screen reader gives the link.
<Pin3D href="/projects/atlas" title="View project">
<div class="flex size-72 flex-col gap-1">
<h3 class="font-semibold">Atlas</h3>
<p class="text-muted-foreground text-sm">Maps for every team.</p>
</div>
</Pin3D>Accessibility
With href, a link covers the card and holds nothing but title as hidden text, so a screen reader hears one link by that name, then the card's text as plain content. Without a title, the card's whole text names the link. Keyboard focus on the link leans the card back and shows the pin, as hover does. The label, line and rings are hidden from assistive tech, so a card without href reads its title from hidden text placed before the card. Under reduced motion nothing moves: the card stays upright, the rings hold still, the line stands at full height, and the layer holding them only fades in.
- Tab
- Moves focus to the card's link, which leans the card back and shows the pin.
- Enter
- Follows the link.
Demos
Image
A trail card with a 4:3 photo of a hilltop and a caption giving its name and a 2.4 km loop, linked under the label View trail. Pin3D draws the card's padding, border and rounded corners, so the children are only the photo and the caption under it. The label is also the link's name for screen readers, so make it say where the link goes.
Without a link
A floor-plan marker for Hall B, stand 42, labeled You are here, with no href. The card still leans back and shows its pin under the pointer, but it isn't a link and takes no focus, so the keyboard never brings up the pin. A screen reader still hears You are here before the card's text. Use it where the pin marks a place and nothing opens.
Grid
Two smaller cards side by side, Changelog and Status page, each with its own link and label. Only the hovered one leans back, because each card is its own hover group. Each also keeps 3rem of its own box above the card for the label, so rows of them stack without a label running into the row above.
FAQ
How do I make a 3D Pin card link somewhere?
Pass href. A link then lies over the whole card, named by title, so a click anywhere on the card follows it and Tab stops on it once. Give a title with every href: without one, the link is named by all of the card's text, which a screen reader reads out in one long run.
The link covers the card but not the strip above it where the label shows, and it opens in the same tab unless you pass target. The Grid demo gives each of two cards its own href and title.
How do I open a 3D Pin link in a new tab or through my router?
For a new tab, set target to _blank and rel to noopener beside href. Pin3D hands those three to the link, and every other prop you pass lands on the outer element instead.
Under Solid Router nothing needs to change for client-side navigation, since the router already handles clicks on a plain <a> by default.
Where does the 3D Pin title show up?
In a small pill above the card, at the top of the pin's line, faded in on hover or keyboard focus. Keep it to two or three words that say where the card leads, such as View project or Open changelog.
With an href, the same words are the link's accessible name. Without one, screen readers hear them as hidden text just before the card, since the pill itself is decoration. With no title, there is no pill and the line rises to nothing.
Can I put buttons or links inside a 3D Pin card?
Only without href. With it, the link lies over the whole card, so a click on a button underneath lands on the link instead, and only the keyboard can still reach the button.
Leave href out when the card needs its own controls, and put a link among them. Nothing covers the content then, and tabbing to a button inside the card leans it back and shows the pin, just as focusing the card's link would. The Without a link demo shows the card in this mode.
How do I change the 3D Pin card's padding or background?
In components/ui/pin-3d. A class you pass to Pin3D lands on the outer wrapper, the one that keeps 3rem free above the card for the label, rather than on the card. The card's p-4, border, bg-card and rounded-2xl sit on the element marked data-slot="pin-3d-card".
For a photo that runs to the card's edges, remove p-4 there and pad the text under the photo yourself. The card's overflow-hidden clips the photo to its rounded corners.
How does the 3D Pin animate the tilt and the rings?
With CSS alone, and no script after the first render. On hover or keyboard focus the card moves to rotate-x-40 and scale-80 over 700ms, under a 1000px perspective, which makes it lean back and shrink.
The three rings share the 6-second pin-3d-ring animation, started 2 seconds apart and paused until the card is hovered or focused. They lie on a plane turned 70 degrees, which is why they read as ellipses spreading around the base of the line.
Does the 3D Pin respect reduced motion in Solid?
Yes. Under reduced motion the card stays upright, the three rings hold still at different sizes and the line stands at its full height from the start, so hover and focus still show where the pin is without anything moving.
What remains is a fade. The layer holding the label, line and rings fades in over 500ms, which changes only its opacity.
What does a 3D Pin do on a phone or tablet?
A touch screen can't hover, so the card never leans back and the pin never shows under a finger. A tap on a card with an href follows the link straight away.
Treat the tilt and the label as a bonus for people with a mouse or a keyboard. The card's own text has to say what it is and where it leads, and a card without href is only a plain card on a phone.
API Reference
Pin3D
<div> data-slot="pin-3d"
href?string
Where the card goes. With it, the whole card is one link, named by
title (by the card's own text when there's no title); without it,
the card only shows the pin.
rel?string
The link's rel, such as "noopener noreferrer". Only with href.
target?string
Where the link opens, such as "_blank" for a new tab. Only with href.
title?string
The label on the pin, shown above the card while it's hovered.
class?string
Merged with the part's classes.
--pin-3d-ring-stillstring