Join our Discord Community
Interactive

3D Pin

Interactive 3D pin container with perspective transforms and smooth hover animations. Perfect for React applications requiring stunning visual effects with Next.js integration and TypeScript support.

Powered by

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/3d-pin.json
npx shadcn@latest add https://www.shadcn.io/registry/3d-pin.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/3d-pin.json
bunx shadcn@latest add https://www.shadcn.io/registry/3d-pin.json

Features

  • Interactive 3D transforms with perspective-based mouse tracking and smooth rotations
  • Animated pin perspective using Framer Motion with layered depth effects
  • Customizable hover states with configurable title and href links
  • Responsive design with automatic scaling and proper z-index layering
  • TypeScript support with complete prop definitions and type safety
  • shadcn/ui integration using design tokens and consistent styling patterns

Examples

Interactive Variant Switcher

Loading component...

Demonstrates different content configurations with smooth transitions between examples.

Use Cases

This free open source React component works well for:

  • Portfolio showcases - Project pins with interactive 3D effects built with Next.js
  • Product displays - Feature pins with engaging hover animations using TypeScript
  • Link previews - Enhanced navigation pins with Tailwind CSS styling
  • Landing pages - Eye-catching hero sections with 3D perspective transforms
  • Dashboard pins - Interactive data containers with professional visual appeal

API Reference

PinContainer

PropTypeDefaultDescription
childrenReact.ReactNoderequiredContent to display inside the pin container
titlestringundefinedTitle text shown on hover in the perspective overlay
hrefstring"/"URL to navigate to when clicked
classNamestringundefinedAdditional CSS classes for the inner content
containerClassNamestringundefinedAdditional CSS classes for the outer container

PinPerspective

PropTypeDefaultDescription
titlestringundefinedTitle text for the hover overlay link
hrefstringundefinedURL for the overlay link target

Implementation Notes

  • Component requires motion library for smooth animations and transforms
  • Place within a container with sufficient height (recommended: 40rem minimum)
  • Uses CSS transforms and perspective for 3D effects - avoid conflicting transform styles
  • Hover states trigger automatic rotation and scaling animations
  • Links open in new tabs by default for external URLs
  • Compatible with both light and dark themes through design tokens