crucıble

Placard

An animated tooltip / hover-card that springs up on hover or focus. The dark-glass card follows the pointer with a subtle velocity-keyed 3D tilt, scales in from 90%, flips on collision, and carries a single cool accent hairline. Fully accessible — role=tooltip, focus + Escape/blur dismissal, aria-describedby wiring — and idle-silent until engaged; reduced motion falls back to an anchored fade.

motionfree

Installation

CLI

npx shadcn@latest add @crucible/placard

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
childrenReact.ReactElementThe trigger — a single focusable React element (button, link, avatar). Hovering or focusing it reveals the card. It receives aria-describedby wiring automatically.
contentReact.ReactNodeContent rendered inside the floating card — name/role, rich preview, etc.
placementPlacement"top"Preferred side of the trigger/pointer the card opens toward. Flips to the opposite side automatically when it would collide with the viewport edge.
followbooleantrueWhen true the card follows the pointer while hovering (with a subtle velocity-keyed tilt). Keyboard focus always anchors to the trigger instead.
tiltnumber8Peak 3D lean, in degrees, applied from pointer velocity while following. Dialed low so the card reads as a physical surface catching light.
springPlacardSpring{ stiffness: 300, damping: 26, mass: 0.7 }Spring driving position, scale, and tilt.
openDelaynumber120Delay before opening, in ms.
closeDelaynumber120Delay before closing, in ms.
arrowbooleantrueRender the little pointing arrow on the anchored edge.
collisionPaddingnumber8Minimum gap kept between the card and the viewport edge, in px.
accentColorstring"#38bdf8"Color of the single cool accent hairline at the card's top edge.
classNamestringClasses merged onto the floating card.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.