Skip to content

COMPONENT / perspective-grid

Perspective Grid_

Signal floor grid tilted toward a glowing horizon, scrolling toward the viewer. Pure CSS; static under reduced motion. Requires @cybr/tokens and @cybr/effects.

Install

  1. 1. Map the @cybr namespace, once per project. Add this inside your components.json, or into its existing "registries" object. No components.json yet? Run npx shadcn@latest init first to create one.

    "registries": { "@cybr": "https://cybr-ui.com/r/{name}.json" }
  2. 2. Add components:

    $ npx shadcn@latest add @cybr/perspective-grid

If shadcn reports Unknown registry "@cybr", step 1 is missing from that project's components.json.

Preview

02 / PERSPECTIVE GRID

DESATURATED · NO SUNSET GRADIENTS

Props

Component props
PropTypeDefaultDescription
cellSizenumber48Grid cell size in px before the tilt. The scroll moves one cell per 1.4s.
...propsComponentProps<"div">—Every other native <div> attribute is forwarded; className is merged last with cn(). Give the root a height (or content) and any layout classes; they apply to the children directly.

Usage

Needs the stylesheets from @cybr/tokens and @cybr/effects. After the install, import them in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
@import "../styles/cybr-effects.css";
import { PerspectiveGrid } from "@/components/ui/perspective-grid";

export function Horizon() {
  return (
    <PerspectiveGrid className="flex min-h-96 items-start justify-center pt-16">
      <h1 className="font-display text-display-lg text-ink uppercase">Sector 7</h1>
    </PerspectiveGrid>
  );
}

States

Accessibility