oxyn

Noise Flow: a loader for upload and download

Noise rings born calm at the center flow out and fade. A React loader for an AI agent uploading or downloading. Install with shadcn.

Installation

Install with the shadcn CLI, or copy the component file. It only needs React.

npx shadcn@latest add https://oxyn.space/r/noise-flow.json

Usage

Updates live with the parameters you set.

import { NoiseFlow } from "@/components/noise-flow";

export function Thinking() {
  return (
    <NoiseFlow />
  );
}

Props

PropTypeDefaultDescription
direction"out"|"in""out""out" sends rings from the center to the edge (uploading, sending); "in" brings them from the edge to the center (downloading, receiving).
linesnumber4Number of concentric rings.
lineSpacingnumber3Gap between neighboring rings in px. Keep it low so the rings sit close together.
lineWidthnumber1Stroke width of each ring in px.
amplitudenumber8Strength of the noise: how far the outer ring is pushed in or out, in px. Inner rings move proportionally less.
frequencynumber0.8How many bumps run around a ring. Low values give broad, soft swells; high values give tighter ripples.
speednumber0.35How fast the noise drifts over time.
durationnumber2.4Seconds for one ring to travel from the center to the edge (or back, going in).
spreadnumber0.12How differently neighboring rings move. 0 keeps them in lockstep; higher lets each ring wander on its own.
sizenumber160Width and height of the orb in px.
minOpacitynumber0.35Opacity of the innermost ring. The outer ring is always fully opaque.
colorstring"#e4e4e7"Line color.
pausedbooleanfalseCoast to a stop on the current frame without unmounting. Turning it off eases back up to speed.
labelstring"Thinking"Accessible name; the wrapper is role="status".
className / style——Spread onto the wrapper div, along with any other div props.

Switch states

Noise Flow is one of the animations in Noise Rings. Use the group when the agent's state changes, and it morphs between them.

More states

Also for this state