Skip to content
AI Chat Fancy Stable

PixelLoader

.md

Grid of pixels pulsing in a diagonal wave as a pre-token loading indicator for AI responses

Available for Svelte 5, React, and Vue 3.

Preview

Installation

pnpm add fancy-ui-svelte
import { PixelLoader } from "fancy-ui-svelte";

Usage

svelte
<script lang="ts">
	import { PixelLoader } from "fancy-ui-svelte";
</script>

<div
	class="flex w-full flex-col items-center justify-center gap-10 rounded-lg border bg-zinc-950 p-10"
>
	<div class="flex items-center gap-3 text-zinc-400">
		<PixelLoader />
		<span class="text-sm">Thinking…</span>
	</div>

	<PixelLoader cols={8} rows={8} cellSize={8} gap={3} color="#22d3ee" speed={2.2} label="Working" />
</div>

Examples

Basic Usage

Props

PropTypeDefaultDescription
cols number5Number of pixel columns
rows number5Number of pixel rows
cellSize number6Size of a single pixel in px
gap number2Space between pixels in px
color string"var(--ft-pixel-color, currentColor)"Pixel colour, any CSS colour value
speed number1.6Duration of one full pulse cycle in seconds
label string"Loading"Accessible label announced by assistive tech