# Pixel loader

A pixel spinner with a label and a running clock.

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

## Import

```ts
import { PixelLoader } from "@heyramzi/ui/ai/loading-state";
```

## Demo

```svelte
<script lang="ts">
	import { PixelLoader } from "@heyramzi/ui/ai/loading-state";
</script>

<div class="stack">
	<PixelLoader label="Reading the workspace" />
	<PixelLoader label="Writing the migration" startSeconds={47} />
	<PixelLoader label="Waiting on the tool" elapsed={false} />
</div>

<style>
	.stack {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.875rem;
		width: 100%;
	}
</style>
```

## API

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `label` | `string` | `"Working"` | What the agent is doing. Read out by screen readers. |
| `elapsed` | `boolean` | `true` | Show the running clock beside the label. |
| `startSeconds` | `number` | `0` | Seconds already spent when the loader mounts, e.g. resuming a run. |
| `class` | `string` |  |  |

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