[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115440":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},115440,"rubber-hose-ui","finktheartist\u002Frubber-hose-ui","finktheartist","Eleven ordinary UI controls drawn as rubber-hose cartoon characters. One file each, no dependencies.","https:\u002F\u002Frubber-hose-ui.vercel.app",null,"JavaScript",220,18,71,0,7,103,46,87.84,"MIT License",false,"main",true,[],"2026-11-16 20:36:33","2026-11-23 15:13:19","# Rubber Hose UI\n\nOrdinary 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.\n\nEach 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.\n\n![The title card: Rubber Hose UI in \"Controls on Parade\"](gallery\u002Ftitle.jpg)\n\n## The eleven\n\n| | element | who he is |\n|---|---|---|\n| [Button](button\u002F) | `\u003Chose-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. |\n| [Toggle](toggle\u002F) | `\u003Chose-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!. |\n| [Slider](slider\u002F) | `\u003Chose-slider>` | A trombone. His slide is the track and his own hand on its handle is the thumb. A fast pull gets a TOOT!. |\n| [Checkbox](checkbox\u002F) | `\u003Chose-checkbox>` | A square fellow who ticks himself: his own arm swings round and slaps the check mark on, with SPLAT!. |\n| [Radio](radio\u002F) | `\u003Chose-radio>` | Round faces, one to a choice. Only the chosen one is awake; pick a sleeper and he pops awake with POP!. |\n| [Input](input\u002F) | `\u003Chose-input>` | A text field with a fountain pen standing on the caret. He hops on every letter and flicks ink. |\n| [Tabs](tabs\u002F) | `\u003Chose-tabs>` | Folder tabs on a rail. The active one stands up with his fists in the air and his legs kicking underneath. |\n| [Progress](progress\u002F) | `\u003Chose-progress>` | A thermometer on his side. The red climbs while he strains and sweats; at a hundred, PHEW!. |\n| [Rating](rating\u002F) | `\u003Chose-rating>` | Five stars in a chorus line. The ones you have given kick in time; the rest are asleep. |\n| [Toast](toast\u002F) | `\u003Chose-toast>` | A toaster. He braces, shakes, and a slice with the message written on it jumps out of his slot, with DING!. |\n| [Tooltip](tooltip\u002F) | `\u003Chose-tooltip>` | A bird pops up from behind the question mark towing the hint on a balloon, with TWEET!. |\n\n## The look\n\nThick 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.\n\nThe 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.\n\n## Try them\n\nLive: https:\u002F\u002Frubber-hose-ui.vercel.app\n\nOr run it yourself:\n\n```sh\npython3 -m http.server 8000     # from this folder\n# open http:\u002F\u002Flocalhost:8000\u002F\n```\n\nThat opens the gallery, with all eleven live.\n\n## Use one\n\nEach is a single file that defines an element. Install it with the shadcn CLI, which puts the file in `public\u002Frubber-hose-ui\u002F`:\n\n```sh\nnpx shadcn add finktheartist\u002Frubber-hose-ui\u002Fbutton\nnpx shadcn add finktheartist\u002Frubber-hose-ui\u002Ftoggle\nnpx shadcn add finktheartist\u002Frubber-hose-ui\u002Fslider\n# ...checkbox, radio, input, tabs, progress, rating, toast, tooltip\n```\n\nOr copy the file into your project by hand. Then load it with a plain script tag and use its element:\n\n```html\n\u003Cscript src=\"button.js\">\u003C\u002Fscript>\n\u003Chose-button>Confirm\u003C\u002Fhose-button>\n\n\u003Cscript src=\"toggle.js\">\u003C\u002Fscript>\n\u003Chose-toggle label=\"Lights\">\u003C\u002Fhose-toggle>\n\n\u003Cscript src=\"progress.js\">\u003C\u002Fscript>\n\u003Chose-progress label=\"Uploading\">\u003C\u002Fhose-progress>   \u003C!-- then el.set(0.4) -->\n```\n\nEach folder's README lists the attributes, properties and events. The value controls (toggle, slider, checkbox, radio, input, rating) work inside a `\u003Cform>` like the native ones.\n\n- **Size.** Each is a drawing 300 pixels wide with the control over it. Give the element another CSS `width` and the whole thing scales.\n- **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 a `hose:line` event with `{ text }`. The gallery types it under each control; you can show it or ignore it.\n- **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.RubberHose` and the others reuse it, so any mix of them on a page shares one clock. The files are between 95 and 210 KB.\n\nFor agents, [llms.txt](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.\n\n## Make your own\n\n`skills\u002Frubber-hose-ui\u002F` is the workflow these were made by, written as a skill for a coding agent. Install it with:\n\n```sh\nnpx skills add finktheartist\u002Frubber-hose-ui\n```\n\nOr copy the folder into your agent's skills folder by hand (for Claude Code, `~\u002F.claude\u002Fskills\u002F`). It has:\n\n- `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.\n- `core.js`, the core every component is built on.\n- `starter.html` and `art\u002F`, the smallest whole example: a favourite button who is a star.\n- `look.mjs`, which stops the clock, steps a reaction to chosen moments and saves the frames side by side.\n\nAn 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.\n\n[making-of\u002F](making-of\u002F) is how the painted parts were made: the three concept directions, every image prompt, and how a generated sheet becomes layers with limbs attached.\n\n## Working on this repo\n\n- `core.js` is the source of the shared core. After editing it, run `node tools\u002Fbuild.mjs`, which stamps it and each component's layers into every component file (between the `\u002F\u002F >>> hose core` and `\u002F\u002F >>> art` markers) and into the skill. `node tools\u002Fbuild.mjs --check` exits 1 if any file is out of date.\n- `art\u002F` holds the painted layers at the size they are shipped. `tools\u002Fbuild.mjs` lists which component carries which. `tools\u002Fart.sh RAWDIR` rebuilds them from the full-size generated sheets, which are not in the repo.\n- `tools\u002Fspec.mjs` says what each component is. `node tools\u002Fdocs.mjs` writes every folder's `README.md` and `index.html`, `registry.json` and `llms.txt` from it, so edit the spec and not those files.\n- `node tools\u002Ftest.mjs http:\u002F\u002Flocalhost:8000\u002Fgallery\u002F?nofilm` drives 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\u002Fshot.mjs URL OUT W H SCALE` takes a full-page screenshot. Both need Chrome or Chromium (`CHROME=...` if it is somewhere unusual).\n\n## Limits\n\n- **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.\n- **Drawn for a light page.** The ink is dark brown; on a dark background the outlines disappear.\n- **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.\n- **English lettering.** The sound effects and the toggle's ON and OFF are painted.\n- **No sound.**\n- **Reduced motion** goes straight to each end state and holds still.\n\n## License\n\nMIT. See [LICENSE](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](https:\u002F\u002Ffonts.google.com\u002Fspecimen\u002FPatrick+Hand) by Patrick Wagesreiter, under the SIL Open Font License, and is embedded in the core.\n","Rubber Hose UI 是一套将11种基础UI控件拟人化为1930年代橡胶软管风格卡通角色的轻量级Web组件库。每个控件（如按钮、滑块、开关等）均实现为单文件自定义元素，内嵌SVG\u002FCanvas绘制与交互逻辑，无外部依赖、无需构建步骤，原生支持键盘导航、屏幕阅读器和表单提交。其核心特点是手绘质感（粗细不均墨线、水彩底色、可拉伸肢体动画）与功能完备性的结合，所有动画均基于CSS\u002FJS驱动且符合无障碍标准。适用于需要在保持高可用性前提下增强趣味性与品牌个性的网页界面，尤其适合教育类应用、儿童产品、创意展示页或设计系统中的实验性组件扩展。",2,"2026-11-24 04:51:00","CREATED_QUERY"]