Contour field
BackgroundsOriginal topographic lines on the inherited paper surface, with a bounded GPU renderer.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/contour-field.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes pigment-field, button, card, toggle-group, slider, label, typography. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/pigment-field.json https://luv-jeri.github.io/cojeev-ui/r/contour-field.json https://luv-jeri.github.io/cojeev-ui/r/button.json https://luv-jeri.github.io/cojeev-ui/r/card.json https://luv-jeri.github.io/cojeev-ui/r/toggle-group.json https://luv-jeri.github.io/cojeev-ui/r/slider.json https://luv-jeri.github.io/cojeev-ui/r/label.json https://luv-jeri.github.io/cojeev-ui/r/typography.jsonUsing contour field
Place inside a positioned parent with a height. Keep content outside the decorative field.
Control tone, speed (0–3), intensity (0–2) and paused. A still fallback is available when GPU rendering cannot run.
Use an opaque native surface for meaningful text placed above the changing artwork.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
ContourFieldProps
| Prop | Type | Required |
|---|---|---|
speedRelative pace, from 0 (still) to 3. | number | No |
intensityColor and relief strength, from 0 to 2. | number | No |
toneAccent selection from the inherited Cojeev theme. | FieldTone | No |
pausedFreeze the current artwork without removing it. | boolean | No |
Accessibility
The field is decorative, inert and ignores pointer hit testing.
Animation suspends with reduced motion, shared quiet settings, hidden tabs and offscreen content.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.