Magnetic Card

PreviousNext

A card that follows the cursor with spring physics, adding a soft parallax tilt and glow.

Magnetic Surface

Move your cursor across the card. It follows with spring physics and a soft parallax tilt.

Spring · stiffness 220

Installation

pnpm dlx shadcn@latest add https://matos-ui.com/r/magnetic-card.json

Usage

import { MagneticCard } from '@/components/matos-ui/magnetic-card'
<MagneticCard>
  <h3>Magnetic Surface</h3>
  <p>Move your cursor to feel the pull.</p>
</MagneticCard>

Reference

MagneticCard Props

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"Maximum width and padding preset.
intensitynumber12Pixel distance the card drifts toward the cursor.
tiltnumber8Maximum 3D tilt in degrees.
stiffnessnumber220Spring stiffness for the follow motion.
dampingnumber18Spring damping for the follow motion.