fayazara/robot-heads

★ 169⑂ 24

Animated 3D robot heads for React: TV-headed bots with LED faces that show what your agent is doing.

About fayazara/robot-heads

fayazara/robot-heads is an open-source project on GitHub, mainly written in TypeScript. Animated 3D robot heads for React: TV-headed bots with LED faces that show what your agent is doing. It currently holds 169 stars and 24 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #91 with 0 new stars today.

GitHub Repository Details

Repository fayazara/robot-heads · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

robot-heads

Animated 3D robot heads for React. Glossy, TV-headed bots with an LED-matrix face that shows what your agent is doing — thinking, searching, listening, speaking and more — in four shapes, with a springy antenna, knob ears and a light on top that changes with the state.

Drawn on a 2D canvas: no WebGL, no runtime dependencies.

Playground →

Install

npm install robot-heads

React 18 or newer is a peer dependency.

Quick start

import { RobotHead } from 'robot-heads';

function Agent({ status }: { status: 'idle' | 'thinking' | 'speaking' }) { return ; }

Shapes

One head, four outlines. Every shape carries the same screen, ears, antenna, screws and back panel, and moves the same way.

  {/ the classic TV (default) /}

{/ a porthole /} {/ a nut, flat on top /}

The list is exported as robotHeadShapes.

States

Each state has its own face on the screen, its own motion and its own antenna light. Switching states plays a short glitch and cross-fade, and the head eases into its new pose.

| State | Screen | Motion | |---|---|---| | idle | block eyes that blink and glance | looks around, hops now and then | | thinking | heavy-lidded eyes looking up, three pulsing dots | head tilted up, switching sides; amber light pulses | | searching | darting eyes, a beam sweeping the whole screen | head sweeps side to side; cyan beacon | | listening | alert eyes over a live equaliser | head cocked, small nods; steady green light | | speaking | a mouth that moves with the words | bobs as it talks | | working | focused eyes looking down, a progress bar | busy bobbing, a hop with a spin now and then | | happy | ^ ^ eyes and a smile | bouncy hops | | error | red X X eyes | shakes its head; red light blinks | | sleeping | closed eyes and rising z's | head drooped, slow breathing; light off |

The list is exported as robotHeadStates.

Props


Any other attribute (className, style, onClick, aria-label, …) goes on the element, and a ref reaches the `` inside it.

Sizing and layout

size is the robot itself: the element is a size × size box with the robot at rest centred in it, filling it, antenna included. It lines up with text, sits in a flex row, and centres like an icon or an avatar would.

Its motion is not part of that box. Hops, the antenna's glow and the floor's shadow draw past its edges — like a CSS box-shadow, they overflow without taking any room in your layout, and only the box takes clicks. So margins, flex and grid treat it as exactly size × size; the one thing to watch is a parent with overflow: hidden right round it, which would cut off a hop.

Behaviour

How it is drawn

The head is real geometry: a shell with a rolled edge — its outline a convex polygon of corner centres grown by a corner radius, so one builder makes every shape — lathed knob ears and an antenna collar, built once as quad meshes. Each frame it is turned with the pose and projected, back faces are culled, and every quad is lit by a small studio model: a key light, a fill, a sky dome, a softbox and the key's window caught as clear-coat reflections with Fresnel, a cool back light rimming the silhouette, and a filmic tone curve.

The flat front and back are plates drawn in their own plane with baked relief: the lip rolling into the screen hole, the rubber gasket, the shadow the lip casts onto the glass, screws, and vents on the back. The glass sits a little behind the bezel, so it slides against it as the head turns. The LED matrix covers the whole screen, the face centred on it; the LEDs are drawn crisp, then bloomed from a one-pixel-per-LED image scaled up smooth. The antenna is a damped spring that whips when the head hops, lands or tilts, topped with a frosted bulb lit from inside.

Development

The repo is a pnpm workspace: the library at the root, the playground in site/ — a React app on Vite served by a Cloudflare Worker. The playground runs on the library's source, so edits hot-reload there.

pnpm install
pnpm run dev       # the playground
pnpm run build     # the library, to dist/
pnpm run typecheck
pnpm run deploy    # build and deploy the playground Worker
src/            the library
  RobotHead.tsx   the component
  tv/             the TV head: geometry, lighting, faces, motion, renderer
site/           the playground (Vite + Cloudflare Worker)

License

MIT © Fayaz Ahmed

The playground is set in Open Runde by Laurids Kern, under the SIL Open Font License 1.1 (site/public/fonts/OFL.txt). The font is not part of the npm package.

GitHub Stars & Activity

169Stars
24Forks
0Open issues
TypeScriptLanguage

GitHub Popularity

GitHub stars169
Forks24
Open issues0
Primary languageTypeScript
License-
Stars gained today0
Created-
Last pushed-

Trending History

Daily boardrank #91 · ▲ 0 stars

Related AI Projects

1

deepseek-ai / deepseek-harness

TypeScript★ 246,948⑂ 0
→
2

n8n-io / n8n

TypeScript★ 206,922⑂ 0
→
3

firecrawl / firecrawl

TypeScript★ 190,186⑂ 0
→
4

anthropics / claude-code

TypeScript★ 150,038⑂ 26,076▲ 195 stars
→
5

morluto / rea

TypeScript★ 68,437⑂ 14,407▲ 25,784 stars
→
6

appwrite / appwrite

TypeScript★ 57,623⑂ 5,776▲ 11 stars
→
7

Yeachan-Heo / oh-my-claudecode

TypeScript★ 39,768⑂ 3,560▲ 44 stars
→
8

mksglu / context-mode

TypeScript★ 26,217⑂ 1,888▲ 178 stars
→

More AI Rankings