Skip to content
VenusUI
Get started

Glow Grid

Cards whose borders light up near the pointer, as if a light moved across them.

Preview

Installation

npx shadcn@latest add @venusui/glow-grid

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/glow-grid.tsx

Usage

The 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>
  )
}

API reference

PropTypeDefaultDescription
colorstring"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.

Requirements

  • React 19 and Tailwind CSS v4.

Customization

  • Every GlowCard inside one GlowGrid shares the light, so neighbors glow too.
  • Change the light size (260px) in the class list.

Accessibility

  • Pure decoration; cards keep their normal borders for touch and keyboard users.

Troubleshooting

Nothing lights up.
Cards must be GlowCards inside a GlowGrid.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (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 found
Run npx shadcn@latest init in your project first.
Loading preview

A card with a soft light that follows the pointer.

Loading preview

A card that tilts in 3D toward the pointer with spring physics.

Loading preview

A flight boarding pass with a perforated stub and code that flips to the fare and baggage details.