# useStatusLine

> A line of status an editor says things on, what it is doing and what an action had nothing to do on, which clears itself after a few seconds.

```bash
npx shadcn@latest add @audio-ui/use-status-line
```

```ts
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

```tsx
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`](/docs/hooks/use-clip-edits) takes `say` as its `notify`.
