Depth background
Visual effectsLayered pollen, contours and orbital shapes with perspective, native-scroll depth and pointer response.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/depth-background.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes card, typography. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/depth-background.json https://luv-jeri.github.io/cojeev-ui/r/card.json https://luv-jeri.github.io/cojeev-ui/r/typography.jsonUsing depth background
Place inside a positioned section; the background fills its parent without intercepting clicks.
Choose a variant and stable seed. Tune density from 0.35 to 2 and intensity from 0 to 2; zero intensity keeps it still.
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.
DepthBackgroundProps
| Prop | Type | Required |
|---|---|---|
variant | DepthBackgroundVariant | No |
densityRelative piece count, bounded to .35–2. | number | No |
intensityMotion strength, bounded to 0–2; zero preserves the still artwork. | number | No |
seed | number | string | No |
Accessibility
Decorative, hidden from assistive technology and never focusable.
Offscreen, hidden-page and reduced-motion states stop its movement. Keep text on a readable foreground.
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.