GitHub Stars
Docs
Cursor Cards

Cursor Cards

Interactive cards with animated gradient borders that respond to cursor movement and proximity. Inspired by Cursor's website.

Installation

pnpm dlx shadcn@latest add https://badtz-ui.com/r/cursor-cards.json

Usage

import { CursorCardsContainer, CursorCard } from "@/components/ui/cursor-cards";
<CursorCardsContainer>
  <CursorCard>
    <div className="h-full w-full py-4 px-6 max-w-72 space-y-2">
      <h3 className="font-gilroy text-2xl">Cursor Card</h3>
      <p className="text-sm">
        This is a cursor card component.
      </p>
    </div>
  </CursorCard>
</CursorCardsContainer>

Props

cursor-cards-container props.

PropTypeDescriptionDefault
childrenReact.ReactNodeThe child components to render inside the container.-
classNamestringAdditional custom classes.-
proximityRangenumberRange in pixels for detecting mouse proximity.400

cursor-card props.

PropTypeDescriptionDefault
childrenReact.ReactNodeThe content to render inside the card.-
classNamestringAdditional custom classes.-
illuminationRadiusnumberRadius of the illumination effect in pixels.200
illuminationColorstringColor of the illumination effect."#FFFFFF10"
illuminationOpacitynumberOpacity of the illumination effect (0-1).0.8
primaryHuestringPrimary color for the gradient border."#EC4899"
secondaryHuestringSecondary color for the gradient border."#6D77D5"
borderColorstringDefault border color when not hovering."#E5E5E5"

Credits

  • This component is inspired by Cursor
  • Previous
    Next