a1ui
6 new components shipped

ASCII Signal

A small ASCII waveform that changes with an idle, processing, or complete state.

Read agent guide

Demo

Ready to generate

Installation

pnpm dlx shadcn@latest add https://ui.arjayby1.xyz/r/ascii-signal.json

Code

"use client";

import { useState } from "react";
import { AsciiSignal, type AsciiSignalStatus } from "@/components/ui/ascii-signal";

export function GenerationStatus() {
  const [status, setStatus] = useState<AsciiSignalStatus>("idle");

  return (
    <>
      <AsciiSignal status={status} />
      <button type="button" onClick={() => setStatus("processing")}>
        Start
      </button>
      <button type="button" onClick={() => setStatus("complete")}>
        Finish
      </button>
    </>
  );
}

API reference

PropTypeDefaultPurpose
status"idle" | "processing" | "complete"RequiredSelects the waveform or checkmark.
labelstringText for the current stateVisible text announced when it changes.
pausedbooleanfalseHolds a static frame and stops updates.
classNamestringNoneAdds classes to the outer card.
styleCSSPropertiesNoneAdds inline styles to the outer card.

AsciiSignalStatus and AsciiSignalProps are exported types. Use a different label for each state so assistive technology can announce the change. The ASCII drawing is decorative; the visible label carries the status.

The signal has three fixed states and does not report numeric progress. Give a separate percentage or progress bar when the exact amount matters.

The idle wave moves gently, processing moves faster, and switching to complete draws a checkmark. Motion stops while the component is offscreen or the browser tab is hidden. Reduced motion and paused show a static frame.