# Voice waveform

Bars that move while someone speaks. Click to pause.

Section: Blocks / Chat
Page: https://ui.heyramzi.com/components/voice-waveform
Import path: `@heyramzi/ui/ai/voice-waveform`

## Import

```ts
import { VoiceWaveform } from "@heyramzi/ui/ai/voice-waveform";
```

## Demo

```svelte
<script lang="ts">
	import { VoiceWaveform } from "@heyramzi/ui/ai/voice-waveform";

	let active = $state(true);
</script>

<button
	type="button"
	class="c"
	aria-label="Listening"
	aria-pressed={active}
	onclick={() => (active = !active)}
>
	<VoiceWaveform {active} />
</button>

<style>
	.c {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 5rem;
		background: none;
		border: none;
		padding: 0;
		color: var(--primary);
		cursor: pointer;
	}
</style>
```

## API

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `active` | `boolean` | `false` |  |
| `class` | `string` |  |  |
| `bars` | `readonly number[]` | `DEFAULT_BARS` |  |

Every prop of `HTMLAttributes<HTMLDivElement>` from `svelte/elements`.
