Spotlight Grid

One dithered light under a grid of cards.

Spotlight Grid on an integrations settings page
Still frame

Installation

pnpm dlx shadcn@latest add @gradients-pro/spotlight-grid

Needs a Pro account and the Pro registry setup.

Usage

import { SpotlightCard, SpotlightGrid } from "@/components/spotlight-grid";

<SpotlightGrid className="grid grid-cols-3 gap-3">
  <SpotlightCard className="rounded-xl border p-4">{children}</SpotlightCard>
</SpotlightGrid>;

Props

PropTypeDefaultDescription
palette"ultramarine" | "ember" | "mono" | string[]"ultramarine"A curated ramp, or your own 2 to 6 CSS colours from faint to hot (var(--x) included). Curated ramps switch between a light and a dark version with your theme.
radiusnumber240Radius of the light in CSS pixels.
intensitynumber0.340 to 1. How hot the centre of the light gets. Keep it low behind text.
cellnumber4Size of one dither cell in CSS pixels.
scheme"light" | "dark"follows the pageForces a colour scheme. By default it reads a dark or light class (or data-theme) on <html>, then the system setting.
edgeColor (card)stringthe palette's accentColour of the border where the light touches it.
className, other div propsPassed to the grid or card element.