pnpm dlx shadcn@latest add @audio-ui/use-status-line
import { useStatusLine } from "@/hooks/use-status-line";| Files | hooks/use-status-line.ts |
|---|---|
| Depends on | Nothing |
| npm | Nothing |
| Used by | block-audio-editor |
| Export | Kind | What it is |
|---|---|---|
useStatusLine | function | A line of status an editor says things on: what it is doing ("Rendering…") and what an action had nothing to do on. |
Usage
import { useStatusLine } from "@/hooks/use-status-line";
const [status, say] = useStatusLine(); // clears after 5 s; pass milliseconds to change it
say("Rendering…");
say("No silence at the start or the end");
<span aria-live="polite">{status}</span>;Saying something else replaces the message and starts its time again; saying an empty string clears it. useClipEdits takes say as its notify.