oxyn

Bar Write: a loader for editing a file

A ring of thin bars typed in bursts, then wiped in order. A React loader for an AI agent editing or writing a file. 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/bar-write.json

Usage

Updates live with the parameters you set.

import { BarWrite } from "@/components/bar-write";

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

Props

PropTypeDefaultDescription
barsnumber36Number of bars around the ring.
barHeightnumber12Resting height of each bar in px, pointing away from the center.
barWidthnumber2Thickness of each bar in px. Capped so neighbors never overlap.
radiusnumber1Corner radius of each bar in px.
extendnumber10How far a keystroke grows a bar in px. The mark it leaves is about a third of that.
durationnumber0.2Seconds one keystroke takes to pop and settle to its mark.
staggernumber0.05Seconds between keystrokes; bars are typed in bursts of four.
direction"out"|"in""out"Which way the push carries a bar: away from the center, or toward it.
sizenumber160Width and height of the orb in px.
minOpacitynumber0.35Opacity of resting bars. Bars at the peak of the wave are always fully opaque.
colorstring"#e4e4e7"Bar 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

Bar Write is one of the animations in Bar Ring. Use the group when the agent's state changes, and it morphs between them.

More states