Xzero UI
Pro library

Spotlight gridPro

A feature grid where light follows the pointer, cards play live demos, and a click morphs a card into its detail.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/spotlight-grid
Live · keyboard ready

Use this as a starting point and replace the sample data with your own.

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/spotlight-grid

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { SpotlightGrid } from "@/components/xzero/blocks/spotlight-grid/spotlight-grid";

export function FeaturesSection() {
  return (
    <section style={{ padding: "96px 24px" }}>
      <SpotlightGrid />
    </section>
  );
}

API reference

SpotlightGrid

A marketing feature grid of four cards (latency, deploys, flags, review). A soft light follows the mouse along the card borders, hovering a card plays a small live preview, and opening a card morphs it into a working detail view in place. Copy, charts, and people are sample data inside the file. Also the default export.

No props.

Keyboard interactions

KeysAction
TabMoves between the card buttons. Each card title is a button that stretches over the whole card.
Enter / SpaceOpens the focused card into its detail view; focus moves to the close button.
EscapeCloses the open detail view and returns focus to the card that opened it.
Arrow keysInside a detail view, move and select within the time range and rollout segmented controls.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Guidance for AI tools

Blocks are complete, self-contained screens with sample data. Replace the sample data and connect the callbacks described above. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components