Loading preview
Spotlight Card
CardsA card with a soft light that follows the pointer.
Cards whose borders light up near the pointer, as if a light moved across them.
npx shadcn@latest add @venusui/glow-gridRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/glow-grid.tsxThe code behind the preview above.
glow-grid-demo.tsx
import { GlowCard, GlowGrid } from "@/components/ui/glow-grid"
const cards = [
{ title: "Analytics", body: "See what people do in your app." },
{ title: "Alerts", body: "Hear about problems first." },
{ title: "Automations", body: "Let routine work run itself." },
{ title: "Reports", body: "Share results with your team." },
]
export default function GlowGridDemo() {
return (
<GlowGrid className="w-full max-w-xl sm:grid-cols-2">
{cards.map((card) => (
<GlowCard key={card.title}>
<p className="font-medium">{card.title}</p>
<p className="mt-1 text-sm text-muted-foreground">{card.body}</p>
</GlowCard>
))}
</GlowGrid>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| color | string | "oklch(0.75 0.17 290)" | GlowGrid: color of the light. Any CSS color. |
GlowGrid and GlowCard accept all <div> props. Lay out the grid with grid classes.
GlowCard inside one GlowGrid shares the light, so neighbors glow too.GlowCards inside a GlowGrid.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A card with a soft light that follows the pointer.
A card that tilts in 3D toward the pointer with spring physics.
A flight boarding pass with a perforated stub and code that flips to the fare and baggage details.