Skip to content
MIZU.

Signal

A waveform you can scrub — drag horizontally to move the phase, hover to light the bars.

View .md

Live — this one is real

Drag horizontally to scrub the phase — hover to light the bars

Usage

tsx
import { Signal } from "mizu-ui";

export function Wave() {
  return <Signal density={14} />;
}

Source & setup

Add this component to your project with the shadcn CLI. The command copies its source into your configured UI directory, with base.css, Mizu’s tokens, and the stylesheets that hold its rules. Each rule lives in one stylesheet, so components you add together never repeat CSS. In a project without a components.json, run npx shadcn@latest init 0xuser64bit/mizu/preset first: plain init installs shadcn’s theme into your global CSS. Then load the fonts.

sh
npx shadcn@latest add 0xuser64bit/mizu/signal

Every component imports from its own path, its name in kebab case. To paste the example, replace its mizu-ui import with:

tsx
import { Signal } from "@/components/ui/mizu/signal";

For npm imports, import mizu-ui/styles.css once. Fonts are optional via mizu-ui/fonts.css. Override --mizu-* tokens or use className for local styling. Requires React and Motion. A Client Component: its source starts with “use client”.

Inspect lab/Signal.tsx

Source is included in the npm package under src/lab/Signal.tsx.

Open full source ↗

Props

PropTypeDefaultDescription
densitynumber14Bar width divisor — lower is denser.
speednumber1Auto-advance rate when not dragging.

Accessibility

A labelled native range input provides keyboard scrubbing alongside pointer dragging.

Motion

Pointer capture for drag; phase eases back to auto-advance on release.

Works alongside