Cloud Particles
interlace-ui/cloud-particlesFreeComponent
Volumetric drifting clouds as a decorative backdrop. Each cloud is a radial-gradient ellipse pushed through a five-pass SVG turbulence filter — body, cool underside, soft shadow, deep shadow — and translated across `130vw`.
Install it
npx shadcn@latest add https://ds.interlace.tools/r/cloud-particles.jsonSource
1"use client";23import { ComponentPropsWithoutRef, useEffect, useId, useState } from "react";45// @interlace/cloud-particles v1.1.0 — Interlace design system.6// Docs, props and live preview: https://ds.interlace.tools/c/cloud-particles7// What changed since: https://ds.interlace.tools/c/cloud-particles#history8// Generated banner — keep it, the upgrade diff reads this version.910/**11 * @interlace/ui — CloudParticles12 *13 * Volumetric drifting clouds as a decorative backdrop. Each cloud is a14 * radial-gradient ellipse pushed through a five-pass SVG turbulence filter —15 * body, cool underside, soft shadow, deep shadow — and translated across16 * `130vw`.17 *18 * It is an `absolute inset-0` overlay: `aria-hidden`, `pointer-events-none`,19 * and reserving no flow space, so the consumer owns the positioned ancestor.20 *21 * ## Provenance22 *23 * No MUI or shadcn analogue exists for an atmospheric layer, so the shape24 * follows the local `aceternity/` convention (`StarsBackground`, `Meteors`).25 * Against the effect this was adapted from, what is ours: every `floodColor`26 * is a prop defaulting to a CSS custom property instead of a baked `rgb()`27 * literal; the filter id comes from `useId()` rather than one global id that28 * two mounted instances would collide on; and the reduced-motion frame below.29 *30 * ## Anatomy31 *32 * CloudParticles (div — data-slot="cloud-particles",33 * aria-hidden, pointer-events-none)34 * ├─ style (per-instance `{filterId}-drift` keyframe)35 * ├─ svg (data-slot="cloud-particles-filter" —36 * │ 2× feTurbulence, then 4 displaced layers37 * │ composited through feMerge)38 * └─ div ×count (data-slot="cloud-particles-cloud")39 * └─ div (data-slot="cloud-particles-shape")40 *41 * Layout is a deterministic golden-ratio walk (`buildClouds`), not42 * `Math.random()`, so server and client agree and the same props always43 * produce the same field. `count` is clamped to `mobileCount` below44 * `mobileBreakpoint`. Both the keyframe and the clouds render only after45 * mount, so SSR emits the filter and nothing else.46 *47 * ## Motion48 *49 * A CSS keyframe, gated three ways. The drift class is written50 * `motion-safe:animate-[var(--cloud-animation)]` and is only added when51// … truncated
More from interlace-ui
All 140 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| A11y Startera11y-starter | interlace-ui | Components | Free | no deps | |
| Accordionaccordion | interlace-ui | Components | Free | no deps | |
| Alertalert | interlace-ui | Components | Free | no deps | |
| Alert Dialogalert-dialog | interlace-ui | Components | Free | no deps | |
| Animated Gradient Textanimated-gradient-text | interlace-ui | Components | Free | no deps | |
| Animated Grid Patternanimated-grid-pattern | interlace-ui | Components | Free | no deps | |
| Animated Listanimated-list | interlace-ui | Components | Free | no deps | |
| Article Cardarticle-card | interlace-ui | Components | Free | no deps |
