Skip to content

    Browse components

    Contour Map

    Animated topographic contour lines over slowly shifting terrain, with a hill that rises under the cursor. WebGL.

    Contour Map

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/contour-map

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/contour-map.json

    Usage

    import { ContourMap } from "@/components/ui/contour-map";
    
    <div className="relative h-96">
      <ContourMap color="#38bdf8" peakColor="#c6ff3d" />
    </div>

    Props

    PropTypeDefaultDescription
    colorstring"#38bdf8"Color of the low contour lines.
    peakColorstring"#c6ff3d"Color of the peaks.
    levelsnumber22Contour density.
    lineWidthnumber1Line width in px.
    speednumber1Drift speed multiplier.
    scalenumber1Terrain zoom.
    cursorHillnumber1Height of the hill under the cursor.
    classNamestring—Extra classes for the root element.