Browse components
Topography
Animated topographic contour lines over slowly shifting terrain, with a hill that rises under the cursor. WebGL.
Topography
Installation
npx shadcn@latest add @glint-ui/topographyFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/topography.json
Usage
import { Topography } from "@/components/ui/topography";
<div className="relative h-96">
<Topography color="#38bdf8" peakColor="#c6ff3d" />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| color | string | "#38bdf8" | Color of the low contour lines. |
| peakColor | string | "#c6ff3d" | Color of the peaks. |
| levels | number | 22 | Contour density. |
| lineWidth | number | 1 | Line width in px. |
| speed | number | 1 | Drift speed multiplier. |
| scale | number | 1 | Terrain zoom. |
| cursorHill | number | 1 | Height of the hill under the cursor. |
| className | string | — | Extra classes for the root element. |