# Holo Card

A card with a soft glow that follows the mouse.

- Category: Core Elements
- Page: https://wunderui.com/components/holo-card
- Tier: Free

## Install

```bash
npx wunderui-cli add holo-card
```

## Import

```tsx
import { HoloCard } from "@/components/wunderui/holo-card"
```

## Minimal usage

Then use it:

```tsx
import { HoloCard } from "@/components/ui/holo-card"

export function Featured() {
  return (
    <HoloCard className="w-72">
      <p className="text-sm font-semibold text-foreground">Holo Card</p>
      <p className="mt-1 text-sm text-text-secondary">Hover to reveal the spotlight effect.</p>
    </HoloCard>
  )
}
```

Expected result: You see a bordered card with two lines of text. A soft glow in the primary colour follows the mouse while it is over the card.

## Usage

```tsx
import { HoloCard } from "@/components/ui/holo-card"

export function Example() {
  return (
    <HoloCard className="w-72 max-w-full">
      <p className="text-sm font-semibold text-foreground">Holo Card</p>
      <p className="mt-1 text-sm text-text-secondary">Hover to reveal the spotlight effect.</p>
    </HoloCard>
  )
}
```

## When to use

### Use Holo Card for

- A featured plan on a pricing section or a landing page
- One announcement or upgrade offer on a dashboard
- A showcase item that should reward a closer look with the mouse

### Use something else

- [Card](https://wunderui.com/components/card) for everyday content, dashboard tiles and anything that is a list of equals
- [Hover Card](https://wunderui.com/components/hover-card) for a preview that opens beside a trigger on hover
- [Alert](https://wunderui.com/components/alert) for a message about the state of the page or a form

## Behavior

How the card reacts to the pointer, focus and motion. It has no keyboard interaction of its own.

- **The glow:** The glow follows the mouse and is 320 px across at any card size. It starts at the middle of the card, so it never jumps in from a corner.
- **Hover only:** The glow shows while the pointer is over the card and fades out when it leaves. Touch screens have no hover and a keyboard never moves the pointer, so neither gets the effect.
- **No focus, no role:** The card is a plain div: not focusable and not announced. Any link or button inside keeps its own focus ring and role.
- **Colour:** The glow mixes the primary colour at 25 % with transparent, so it follows brand and dark mode. Set the primary colour on a wrapper to tint it.
- **Fade:** The glow fades in and out quickly. Its position isn't animated: it jumps to the pointer on every move.
- **Reduced motion:** Nothing on the card moves and the glow is a colour change, so reduced motion changes nothing. To drop the effect anyway, hide the glow with a class; the card is complete without it.

## Anatomy

- `HoloCard`: A card with a border, 16 px padding and a 16 px radius that clips its content. It tracks the pointer position for the glow, and you pass a class for the width.
- `Glow`: A radial gradient 320 px across in the primary colour at 25 %, fading out. It fades in on hover, follows the pointer and sits behind the content; the figure keeps it on.
- `Content`: The children, placed above the glow. Anything goes: text, an icon tile, a badge, buttons.

## Best practices

### When to use

- Use a Holo Card to make one or two showcase items stand out, such as a featured plan on a landing page. For everyday content and dashboard tiles, use Card.

### Do

- Use it once or twice per view. When every card glows, none of them stands out.
- Tint the glow by setting the primary colour on a wrapper, not with a gradient of your own. It follows brand and dark mode, and everything inside that uses the primary colour changes with it.
- Keep the card complete without the glow. It appears only under a mouse pointer, so touch and keyboard users never need it.
- Put a real link or Button inside for the action, and set the card's width with a class.

### Don't

- Don't rely on the glow to show the card is clickable. It is decoration with no focus state, no role and no tab stop.
- Don't expect a tilt or 3D effect. The card never moves or rotates; only the glow under the pointer changes.

## API reference

### HoloCard

| Prop | Type | Default | Description |
|---|---|---|---|
| children* | React.ReactNode |  | The content of the card, placed above the glow. |
| className | string |  | Extra classes for the card, merged with its own. Use it for the width. Do not use it to change the glow; set `--primary` on a wrapper. |

## Examples

### Content: text, a feature and a plan

```tsx
import { HoloCard } from "@/components/ui/holo-card"

export function Example() {
  return (
    <HoloCard className="w-72 max-w-full">
      <p className="text-sm font-semibold text-foreground">Holo Card</p>
      <p className="mt-1 text-sm text-text-secondary">Hover to reveal the spotlight effect.</p>
    </HoloCard>
  )
}
```

### Appearance: the colour of the glow

```tsx
import { HoloCard } from "@/components/ui/holo-card"

export function Example() {
  return (
    <div className="[--primary:var(--green-600)]">
      <HoloCard className="w-72 max-w-full">
        <p className="text-sm font-semibold text-foreground">Holo Card</p>
        <p className="mt-1 text-sm text-text-secondary">Hover to reveal the spotlight effect.</p>
      </HoloCard>
    </div>
  )
}
```

## In context

### Pricing: one featured plan

The recommended plan is the only holo card. The others are panels with the same border, radius and padding, so the three line up and only one catches the eye.

```tsx
import { Check } from "lucide-react"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
import { HoloCard } from "@/components/ui/holo-card"

const plans = [
  {
    name: "Free",
    price: "$0",
    period: "forever",
    features: ["81 components", "4 agent skills", "Community support"],
    action: "Get started",
  },
  {
    name: "Core",
    price: "$199",
    period: "a year",
    features: ["All components", "Dashboard templates", "Email support"],
    action: "Choose Core",
  },
  {
    name: "Pro",
    price: "$299",
    period: "a year",
    features: ["Everything in Core", "All blocks", "Figma library"],
    action: "Upgrade to Pro",
    featured: true,
  },
]

function PlanContent({ plan }: { plan: (typeof plans)[number] }) {
  return (
    <div className="flex h-full flex-col gap-4">
      <div className="flex items-center justify-between">
        <p className="text-sm font-semibold text-foreground">{plan.name}</p>
        {plan.featured && (
          <Badge color="indigo" badgeStyle="light" shape="pill">
            Recommended
          </Badge>
        )}
      </div>
      <p className="text-2xl font-semibold text-foreground">
        {plan.price} <span className="text-sm font-normal text-text-secondary">{plan.period}</span>
      </p>
      <ul className="flex flex-col gap-2">
        {plan.features.map((text) => (
          <li key={text} className="flex items-center gap-2 text-sm text-text-secondary">
            <Check className="size-4 shrink-0 text-text-tertiary" />
            {text}
          </li>
        ))}
      </ul>
      <Button variant={plan.featured ? "gradient" : "plain"} className="mt-auto w-fit">
        {plan.action}
      </Button>
    </div>
  )
}

export function Example() {
  return (
    <div className="@container">
      <div className="grid gap-4 @2xl:grid-cols-3">
        {plans.map((plan) =>
          plan.featured ? (
            <HoloCard key={plan.name}>
              <PlanContent plan={plan} />
            </HoloCard>
          ) : (
            <div key={plan.name} className="rounded-xl border border-border bg-card p-4">
              <PlanContent plan={plan} />
            </div>
          )
        )}
      </div>
    </div>
  )
}
```

### Announcement: a new feature on a dashboard

A single wide card points at a new feature. Its actions are real buttons, because the glow is decoration and cannot be focused.

```tsx
import { Sparkles } from "lucide-react"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
import { HoloCard } from "@/components/ui/holo-card"

export function Example() {
  return (
    <HoloCard>
      <div className="@container">
        <div className="flex flex-col gap-4 @lg:flex-row @lg:items-center @lg:justify-between">
          <div className="flex items-start gap-3">
            <span className="flex size-9 items-center justify-center rounded-md bg-tint-indigo text-tint-text-indigo [&_svg]:size-[18px]">
              <Sparkles />
            </span>
            <div>
              <div className="flex items-center gap-2">
                <p className="text-sm font-semibold text-foreground">Anomaly detection is here</p>
                <Badge color="indigo" badgeStyle="light" shape="pill">
                  New
                </Badge>
              </div>
              <p className="mt-1 text-sm text-text-secondary">Every metric now learns its usual range and tells you when it moves outside it.</p>
            </div>
          </div>
          <div className="flex shrink-0 gap-2">
            <Button variant="plain">Dismiss</Button>
            <Button variant="gradient">Turn it on</Button>
          </div>
        </div>
      </div>
    </HoloCard>
  )
}
```

## For AI agents

`get_component("holo-card")`

Hand your agent this page as Markdown or the WunderUI MCP server, not a screenshot.
