BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/rivelle/perspective-grid

Perspective Grid

rivelle/perspective-grid
FreeComponent

A pointer-reactive perspective horizon grid without canvas or WebGL.

Install it

npx shadcn@latest add https://rivelle.dev/r/perspective-grid.json

Source

registry/nova/effects/perspective-grid.tsxrivelle.dev/r/perspective-grid.json
1"use client";
2
3import * as React from "react";
4
5import { cn } from "@/lib/utils";
6
7type PerspectiveGridProps = React.ComponentProps<"div"> & {
8 fade?: boolean;
9};
10
11function PerspectiveGrid({
12 children,
13 className,
14 fade = true,
15 onPointerLeave,
16 onPointerMove,
17 style,
18 ...props
19}: PerspectiveGridProps) {
20 return (
21 <div
22 className={cn(
23 "relative isolate overflow-hidden rounded-[2.25rem] border border-foreground/10 bg-foreground text-background",
24 className,
25 )}
26 data-slot="perspective-grid"
27 onPointerLeave={(event) => {
28 event.currentTarget.style.setProperty("--grid-rx", "58deg");
29 event.currentTarget.style.setProperty("--grid-rz", "0deg");
30 onPointerLeave?.(event);
31 }}
32 onPointerMove={(event) => {
33 if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
34 const bounds = event.currentTarget.getBoundingClientRect();
35 const x = (event.clientX - bounds.left) / bounds.width - 0.5;
36 const y = (event.clientY - bounds.top) / bounds.height - 0.5;
37 event.currentTarget.style.setProperty(
38 "--grid-rx",
39 `${58 - y * 24}deg`,
40 );
41 event.currentTarget.style.setProperty("--grid-rz", `${x * 16}deg`);
42 }
43 onPointerMove?.(event);
44 }}
45 style={
46 {
47 "--grid-rx": "58deg",
48 "--grid-rz": "0deg",
49 ...style,
50 } as React.CSSProperties
51 }
52 {...props}
53 >
54 <div
55 aria-hidden="true"
56 className="absolute inset-x-[-35%] bottom-[-32%] h-[88%] origin-bottom transition-transform duration-200 ease-out will-change-transform [backface-visibility:hidden] [transform:perspective(520px)_rotateX(var(--grid-rx))_rotateZ(var(--grid-rz))] motion-reduce:transition-none"
57 style={{
58 backgroundImage:
59 "linear-gradient(color-mix(in oklch, var(--primary) 44%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklch, var(--primary) 44%, transparent) 1px, transparent 1px)",
60 backgroundSize: "56px 56px",
61 }}
62 />
63 <div
64 aria-hidden="true"
65 className="absolute bottom-[26%] left-1/2 h-px w-[70%] -translate-x-1/2 bg-primary/70 shadow-[0_0_40px_8px_color-mix(in_oklch,var(--primary)_45%,transparent)]"
66 />
67 {fade ? (
68 <div
69 aria-hidden="true"
70// … truncated

What it pulls in

Other registry items

  • @rivelle/utils

Files it writes

  • registry/nova/effects/perspective-grid.tsx

Facts

Registry
rivelle
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-12
Last confirmed
today

Go to the source

Docs on rivelle rivelle.dev w3cproject/rivelle-ui on GitHub Raw registry item This item as JSON

More from rivelle

All 83 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionrivelleComponentsFree2 deps
AlertalertrivelleComponentsFree1 dep
Alert Dialogalert-dialogrivelleComponentsFree1 dep
Aspect Ratioaspect-ratiorivelleComponentsFree1 dep
AvataravatarrivelleComponentsFree1 dep
BadgebadgerivelleComponentsFree2 deps
BreadcrumbbreadcrumbrivelleComponentsFree2 deps
ButtonbuttonrivelleComponentsFree2 deps
BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex