Backgrounds & motion / CSS
Perspective grid
An infinite horizon, built from a few simple lines.
Preparing the component workbench…
Backgrounds & motion / CSS
An infinite horizon, built from a few simple lines.
SOURCE / REACT · provisional
import PerspectiveGrid from "@/components/buildwithme/perspective-grid/react";
<PerspectiveGrid />// MIT · BuildWithMe-UI contributors. Original implementation.
'use client';
import { useAnimation, type AnimationProps } from './use-animation';
import './base.css';
import './perspective-grid.css';
export default function PerspectiveGrid({ paused = false }: AnimationProps) {
const { ref, active } = useAnimation(paused);
return (
<div ref={ref} className="bw-demo bw-horizon" data-active={active}>
<div className="bw-horizon-grid" aria-hidden="true" />
<span className="bw-horizon-sun" aria-hidden="true" />
</div>
);
}
Install the registry item to receive all 7 files and their declared dependencies. Copying one file may require the other files shown here.