Pixel Assistant
An AI chat with a pixel character that blinks and talks.
Features
- •A character with moods — Blinks every couple of seconds, looks down while you type, glances away while thinking, moves its mouth as the reply streams in, and falls asleep with floating Zs after a few seconds of quiet.
- •Bring your own AI — onMessage receives the text and history and returns a string or an async iterable of chunks, so streaming from Claude or any API takes a few lines. Without it, friendly demo replies run.
- •Ready answers — Quick questions can carry their own answers, replied instantly with no AI call; questions without one go to your AI.
- •Closes to a mascot — The close button leaves just the character, still blinking and napping, as a launcher; tap it to reopen. Control it yourself with open and onOpenChange.
- •Crisp pixel art — A hand-placed 16x16 character in SVG, sharp at any size, with recolourable body and accent and a pixel font for the name.
- •Accessible — Messages are a live log, status changes are announced, controls are labelled, and reduced motion stops the bobbing and floating.
Props API Reference
10 configurable props| Prop | Type | Default | Description |
|---|---|---|---|
| onMessage | (text, history) => string | AsyncIterable<string> | Promise<…> | demo replies | Your AI. Return the reply, or stream it as text chunks. |
| name / greeting | string | "Dot" / "Hi! I'm Dot…" | Assistant name and its first message. |
| suggestions | (string | { question, answer? })[] | 3 questions with answers | Quick questions before the first message; an answer is replied instantly. |
| placeholder | string | "Ask me anything…" | Message box placeholder. |
| sleepAfter | number | 5000 | Milliseconds without activity before the character naps. |
| blinkEvery | number | 2000 | Milliseconds between blinks. |
| defaultOpen / open / onOpenChange | boolean / boolean / (open) => void | true / — / — | Start open or as just the character, or control it yourself. |
| bodyColor / accentColor | string | "#F3F3F0" / "#FFFFFF" | Character body, and the antenna light, send button and your bubbles. |
| background / textColor | string | "#0B0B0D" / "#FFFFFF" | Chat colours. |
| height | number | 560 | Chat height in px. |