oxyn
All components

Dot Circle

2D3 animations

The whole circle row as one component. Pick pulse, breath or wave with the animation prop; changing it morphs the same dots from one animation into the next.

dot-circle.tsx

Installation

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

npx shadcn@latest add https://your-domain.com/r/dot-circle.json

Usage

Updates live with the parameters you set.

import { DotCircle } from "@/components/dot-circle";

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

Props

For the selected animation. Switch it to see the props each one takes.

PropTypeDefaultDescription
animation"pulse" | "breath" | "wave""pulse"Which animation runs. Changing it blends from the old animation to the new one, and the other props default to that animation’s own values.
dotShape"round" | "square""round"Shape of each dot.
dotSizenumber2.5Resting dot size in px.
scalenumber1.5How many times larger a dot grows at the peak of the animation.
densitynumber11Dots across the width of the sheet.
sizenumber160Width and height of the orb in px.
durationnumber1.6Seconds for one ring to travel across the sheet.
gapnumber0.3Seconds to rest between rings.
ringWidthnumber0.35Thickness of the ring of large dots, as a fraction of the sheet radius.
direction"out" | "in""out""out" spreads from the center to the edge; "in" closes from the edge to the center.
minOpacitynumber0.25Opacity of resting dots. Dots at full size are always fully opaque.
colorstring"#e4e4e7"Dot 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.