A React component that displays a stylish card with a custom animated pointer/label following your mouse. Useful for interactive UI cards, hero sections, or feature spotlights. Inspired by modern web design trends.
You can install the PointerCard component with the following CLI command, or copy the implementation manually:
1npx shadcn@latest add http://localhost:3000/r/pointer-card.jsonTo use the PointerCard component, import it in your code:
1import PointerCard from '@/components/PointerCard';The PointerCard component accepts the following props:
| Prop | Type | Default | Description | Required |
|---|---|---|---|---|
children | React.ReactNode | - | Content to display as the card body. If omitted, a default demo card is shown. | No |
className | string | - | Extra CSS classes for the card container. | No |
title | string | "Quartz UI" | Label to show inside the animated pointer on hover. | No |
1<PointerCard />1<PointerCard title="Cool Pointer!">Custom content</PointerCard>1<PointerCard className="max-w-md border-blue-300">Your content</PointerCard>className prop.1<PointerCard title="CTA Pointer">
2 <div className="flex flex-col p-6 gap-4">
3 <h2 className="text-2xl font-bold">Interactive Card</h2>
4 <p>This card responds to your mouse—great for onboarding, landing pages, or playful UI highlights!</p>
5 <button className="rounded bg-purple-600 text-white py-2 px-4 text-sm font-semibold hover:bg-purple-700">Try Now</button>
6 </div>
7</PointerCard>children to create any content or card body.title prop to set the animated pointer label.className or edit the included demo markup.