Contour Field
Topographic contour map background painted on canvas from a seeded string: a blurred generative field traced with white contour lines from its own luminance, in several palettes. Fills a positioned parent and repaints on resize.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
Installation
pnpm dlx shadcn@latest add @01orbital/contour-fieldnpx shadcn@latest add @01orbital/contour-fieldyarn dlx shadcn@latest add @01orbital/contour-fieldbunx --bun shadcn@latest add @01orbital/contour-fieldUsage
import { ContourField } from "@/components/celestograph/contour-field"
export default function Demo() {
return (
<div className="relative aspect-video w-full max-w-2xl overflow-hidden rounded-2xl">
<ContourField from="enceladus" palette="delft" />
</div>
)
}This example installs with everything it uses:
pnpm dlx shadcn@latest add @01orbital/contour-field-demonpx shadcn@latest add @01orbital/contour-field-demoyarn dlx shadcn@latest add @01orbital/contour-field-demobunx --bun shadcn@latest add @01orbital/contour-field-demoExamples
Tarn Atlascontour-field-tarn-atlas
Example of the Contour Field: a tarn atlas topographic map with fourteen contour levels and a dark inset caption. The contour field is a topographic generative art background for cards and heroes.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
pnpm dlx shadcn@latest add @01orbital/contour-field-tarn-atlasnpx shadcn@latest add @01orbital/contour-field-tarn-atlasyarn dlx shadcn@latest add @01orbital/contour-field-tarn-atlasbunx --bun shadcn@latest add @01orbital/contour-field-tarn-atlasAPI reference
A blurred painted field with white contour lines traced over it, filling its nearest positioned ancestor, used as a background for cards, panels and pages. The same from string always paints the same field.
Hidden from assistive tech. The palette's lower color shows until the field paints, then it fades in over 500ms, or at once with reduced motion. The field and lines are drawn 1.3 times the box size, so their edges fall outside it and are cropped.
Prop
Type
It also accepts the HTML attributes of the element it renders.
Dependencies
npm: @base-ui/react, cn. The CLI installs them for you.
Used in blocks
2 blocks are built with Contour Field:
Last updated on