👋 This is a community-driven shadcn/ui resource. For the official documentation, visit ui.shadcn.com
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
Installation
npx shadcn@latest add https://www.shadcn.io/registry/3d-pin.jsonnpx shadcn@latest add https://www.shadcn.io/registry/3d-pin.jsonpnpm dlx shadcn@latest add https://www.shadcn.io/registry/3d-pin.jsonbunx shadcn@latest add https://www.shadcn.io/registry/3d-pin.jsonFeatures
- 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
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
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | required | Content to display inside the pin container |
title | string | undefined | Title text shown on hover in the perspective overlay |
href | string | "/" | URL to navigate to when clicked |
className | string | undefined | Additional CSS classes for the inner content |
containerClassName | string | undefined | Additional CSS classes for the outer container |
PinPerspective
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | undefined | Title text for the hover overlay link |
href | string | undefined | URL for the overlay link target |
Implementation Notes
- Component requires
motionlibrary 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
3D Marquee
Animated 3D marquee with perspective grid transforms and smooth scrolling images. Perfect for React applications requiring immersive visual displays with Next.js integration and TypeScript support.
Animated Cursor
Advanced animated cursor component with customizable following elements and spring animations. Perfect for React applications requiring interactive cursor effects with Next.js integration and TypeScript support.