Ordinary UI controls as a 1930s rubber-hose cartoon, in which every control is a character. The button is a red dome who gets bopped. The slider is a trombone and his slide is the track. The toast notification is a toaster. Under each drawing is a real control, so they work with a keyboard, a screen reader and a form.
Each one is a single file that defines a custom element, with its drawings inside it, so there is nothing else to fetch. No dependencies, no build step for you, MIT licensed.
| element | who he is | |
|---|---|---|
| Button | <hose-button> |
A red dome with a grin. Press him and a gloved fist flattens him, with stars and BOP!. He springs back black-eyed and bandaged, with birds going round his head. |
| Toggle | <hose-toggle> |
The knob is a lightbulb. Switch it on and he stretches across like taffy, lights up and throws his fists in the air, with CLICK!. |
| Slider | <hose-slider> |
A trombone. His slide is the track and his own hand on its handle is the thumb. A fast pull gets a TOOT!. |
| Checkbox | <hose-checkbox> |
A square fellow who ticks himself: his own arm swings round and slaps the check mark on, with SPLAT!. |
| Radio | <hose-radio> |
Round faces, one to a choice. Only the chosen one is awake; pick a sleeper and he pops awake with POP!. |
| Input | <hose-input> |
A text field with a fountain pen standing on the caret. He hops on every letter and flicks ink. |
| Tabs | <hose-tabs> |
Folder tabs on a rail. The active one stands up with his fists in the air and his legs kicking underneath. |
| Progress | <hose-progress> |
A thermometer on his side. The red climbs while he strains and sweats; at a hundred, PHEW!. |
| Rating | <hose-rating> |
Five stars in a chorus line. The ones you have given kick in time; the rest are asleep. |
| Toast | <hose-toast> |
A toaster. He braces, shakes, and a slice with the message written on it jumps out of his slot, with DING!. |
| Tooltip | <hose-tooltip> |
A bird pops up from behind the question mark towing the hint on a balloon, with TWEET!. |
Thick brush-ink outlines of uneven weight, flat colour over watercolour washes, pie-cut eyes, white four-fingered gloves and big cream shoes. The bodies, faces, gloves, shoes and sound-effect lettering are painted layers. The arms and legs are drawn in code, because a rubber-hose limb is a thick ink line with no elbow and has to stretch as far as the control needs. Everything alive bounces to one beat.
The gallery page adds the film: paper, grain, dust, a flicker and a gate that does not hold quite still. That belongs to the page, not to the controls.
Live: https://rubber-hose-ui.vercel.app
Or run it yourself:
python3 -m http.server 8000 # from this folder
# open http://localhost:8000/That opens the gallery, with all eleven live.
Each is a single file that defines an element. Install it with the shadcn CLI, which puts the file in public/rubber-hose-ui/:
npx shadcn add finktheartist/rubber-hose-ui/button
npx shadcn add finktheartist/rubber-hose-ui/toggle
npx shadcn add finktheartist/rubber-hose-ui/slider
# ...checkbox, radio, input, tabs, progress, rating, toast, tooltipOr copy the file into your project by hand. Then load it with a plain script tag and use its element:
<script src="button.js"></script>
<hose-button>Confirm</hose-button>
<script src="toggle.js"></script>
<hose-toggle label="Lights"></hose-toggle>
<script src="progress.js"></script>
<hose-progress label="Uploading"></hose-progress> <!-- then el.set(0.4) -->Each folder's README lists the attributes, properties and events. The value controls (toggle, slider, checkbox, radio, input, rating) work inside a <form> like the native ones.
- Size. Each is a drawing 300 pixels wide with the control over it. Give the element another CSS
widthand the whole thing scales. - The line. Every character has something to say about what just happened ("Checked. He did it himself and he is very proud."). It is in
el.line, and each new one fires ahose:lineevent with{ text }. The gallery types it under each control; you can show it or ignore it. - How the files share. Each file carries its own painted layers and a copy of the core (the clock, the limbs, the gloves, the shoe and the lettering face, about 80 KB). The first one loaded sets
window.RubberHoseand the others reuse it, so any mix of them on a page shares one clock. The files are between 95 and 210 KB.
For agents, llms.txt lists every file and what it is. In the gallery each control has its install line and a "Copy a prompt" button; the prompt points a coding agent at the real file and tells it to wire it in, not redraw it.
skills/rubber-hose-ui/ is the workflow these were made by, written as a skill for a coding agent. Install it with:
npx skills add finktheartist/rubber-hose-uiOr copy the folder into your agent's skills folder by hand (for Claude Code, ~/.claude/skills/). It has:
SKILL.md, the workflow and the rules. Most of the rules are about joins: where a limb starts, which way a thumb points, how a leg goes into a shoe.core.js, the core every component is built on.starter.htmlandart/, the smallest whole example: a favourite button who is a star.look.mjs, which stops the clock, steps a reaction to chosen moments and saves the frames side by side.
An agent with the skill gets a reasonable first pass. These took many rounds of looking at close-ups and fixing joins, and yours will too.
making-of/ is how the painted parts were made: the three concept directions, every image prompt, and how a generated sheet becomes layers with limbs attached.
core.jsis the source of the shared core. After editing it, runnode tools/build.mjs, which stamps it and each component's layers into every component file (between the// >>> hose coreand// >>> artmarkers) and into the skill.node tools/build.mjs --checkexits 1 if any file is out of date.art/holds the painted layers at the size they are shipped.tools/build.mjslists which component carries which.tools/art.sh RAWDIRrebuilds them from the full-size generated sheets, which are not in the repo.tools/spec.mjssays what each component is.node tools/docs.mjswrites every folder'sREADME.mdandindex.html,registry.jsonandllms.txtfrom it, so edit the spec and not those files.node tools/test.mjs http://localhost:8000/gallery/?nofilmdrives every control with real touch and key events at phone width, checks form values, scaling and sideways scroll, and exits 1 on a failure.node tools/shot.mjs URL OUT W H SCALEtakes a full-page screenshot. Both need Chrome or Chromium (CHROME=...if it is somewhere unusual).
- Checked in headless Chromium, with real touch and key events and frame-by-frame sheets. Not yet tried in Safari or Firefox, on a real phone, or with a screen reader.
- Drawn for a light page. The ink is dark brown; on a dark background the outlines disappear.
- The labels are not shown. The button's and the checkbox's text is their accessible name only, because the drawing is the control. Put a visible label beside them.
- English lettering. The sound effects and the toggle's ON and OFF are painted.
- No sound.
- Reduced motion goes straight to each end state and holds still.
MIT. See LICENSE. The characters are original designs; no existing cartoon's or game's characters are used. The painted layers and the title card were generated with GPT Image (through Higgsfield) for this project. The lettering face is Patrick Hand by Patrick Wagesreiter, under the SIL Open Font License, and is embedded in the core.
