Skip to content
Back to search

sakuga-vfx

Twelve ordinary UI controls that react like anime. One file each, no dependencies.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked yesterday
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/finktheartist--sakuga-vfx/badge.svg)](/listings/finktheartist--sakuga-vfx)

HTML

<a href="/listings/finktheartist--sakuga-vfx"><img src="/api/listings/finktheartist--sakuga-vfx/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 103 lines
  1. # Sakuga VFX
  2. Ordinary UI controls that react like anime. At rest they are plain. Use one and it squashes and overshoots on springs, and throws drawn effects around itself: smoke puffs, impact bursts, crystal chips, slashes, splashes and smoke rings, with manga sound-effect lettering (ドン!, カチッ, ズザッ). No characters, just the way a key animator would sell a hit.
  3. Every effect is drawn in code on one canvas over the page. The lettering was painted with GPT Image and traced to paths, and the toggle is 43 painted frames; both live inside the component files, so there is nothing else to fetch. No dependencies, no build step for you, MIT licensed.
  4. ## The twelve
  5. | | element | what happens |
  6. |---|---|---|
  7. | [Button](button/) | `<sakuga-button>` | Press and it squashes flat. Let go and it inverts for one frame, a burst goes off behind it, clouds roll off the corners and ドン! lands. `done()` puts a check on it. The secondary variant is a small squash and three wedges. |
  8. | [Toggle](toggle/) | `<sakuga-toggle>` | A drawn animation: the knob smears across, slams into the end and throws up a splash, and the track floods and settles. |
  9. | [Slider](slider/) | `<sakuga-slider>` | The thumb stretches into a teardrop and lags on a spring. Drag fast and cumulus rolls up behind it; let go and a crescent flies on ahead. |
  10. | [Checkbox](checkbox/) | `<sakuga-checkbox>` | Two crescents swing round the box, crystals fly, the tick draws itself, ズザッ in dotted letters. |
  11. | [Radio](radio/) | `<sakuga-radio>` | The dot springs in, a fan of wedges, two puffs and a hollow ポン. |
  12. | [Input](input/) | `<sakuga-input>` | Every key kicks up dust where the caret is. |
  13. | [Tabs](tabs/) | `<sakuga-tabs>` | The raised tab slides, stretching, and lands with wedges and a puff. |
  14. | [Progress](progress/) | `<sakuga-progress>` | A storm cloud rides the leading edge, pebbles lift off the ground, ゴゴゴゴ; at the end a burst, ドン! and a check. |
  15. | [Rating](rating/) | `<sakuga-rating>` | Stars pop in one after another; five gets a burst. |
  16. | [Toast](toast/) | `<sakuga-toast>` | Streaks in as a smear, lands in dust with ズザッ, leaves by shrinking. |
  17. | [Tooltip](tooltip/) | `<sakuga-tooltip>` | The hint springs out like a speech bubble with puffs and カチッ. |
  18. ## The look
  19. White paper, two-tone effects (white, lavender and a violet line), pink accents, and an impact burst on every confirm. The controls' colours are `--sk-*` CSS variables (`--sk-ink`, `--sk-card`, `--sk-pri`, `--sk-acc` and so on), and a page's own `:root { --sk-acc: ... }` wins over the defaults.
  20. ## Try them
  21. Live: https://sakuga-vfx.vercel.app
  22. Or run it yourself:
  23. ```sh
  24. python3 -m http.server 8000 # from this folder
  25. # open http://localhost:8000/
  26. ```
  27. That opens the gallery, with all twelve live.
  28. ## Use one
  29. Each is a single file that defines an element. Install it with the shadcn CLI, which puts the file in `public/sakuga-vfx/`:
  30. ```sh
  31. npx shadcn add finktheartist/sakuga-vfx/button
  32. npx shadcn add finktheartist/sakuga-vfx/toggle
  33. npx shadcn add finktheartist/sakuga-vfx/slider
  34. # ...checkbox, radio, input, tabs, progress, rating, toast, tooltip
  35. ```
  36. Or copy the file into your project by hand. Then load it with a plain script tag and use its element:
  37. ```html
  38. <script src="button.js"></script>
  39. <sakuga-button>Confirm</sakuga-button>
  40. <script src="toggle.js"></script>
  41. <sakuga-toggle label="Notifications"></sakuga-toggle>
  42. <script src="progress.js"></script>
  43. <sakuga-progress label="Uploading"></sakuga-progress> <!-- then el.set(0.4) -->
  44. ```
  45. 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.
  46. **How the files share.** Each file carries its own copy of the core (springs, the effects layer, the lettering, about 40 KB). The first one loaded sets `window.SakugaFX` and the others reuse it, so any mix of them on a page shares one canvas and one animation loop. The toggle is about 500 KB because its frames are inside it.
  47. For 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 for your agent" button; the prompt points a coding agent at the real file and tells it to wire it in, not redraw it.
  48. ## Make your own
  49. `skills/sakuga-vfx/` is the workflow these were made by, written as a skill for a coding agent. Install it with:
  50. ```sh
  51. npx skills add finktheartist/sakuga-vfx
  52. ```
  53. Or copy the folder into your agent's skills folder by hand (for Claude Code, `~/.claude/skills/`). It has four files:
  54. - `SKILL.md` is the workflow and the rules.
  55. - `core.js` is the core every component is built on.
  56. - `starter.html` is the smallest whole example, a like button.
  57. - `look.mjs` stops the clock, steps a reaction to chosen moments and saves the frames side by side.
  58. An agent with the skill gets a reasonable first pass. These took many rounds of looking at frames and fixing them, and yours will too.
  59. ## Working on this repo
  60. - `core.js` is the source of the shared core. After editing it, run `node tools/build.mjs`, which copies it into every component file (between the `// >>> sakuga core` markers) and into the skill. `node tools/build.mjs --check` exits 1 if any file is out of date.
  61. - `art/words/` holds the six painted sound-effect words. `tools/trace.py` traces them into paths and writes them into `core.js` (`uv run --with potracer --with pillow --with numpy python tools/trace.py`).
  62. - `toggle/frames.webp` is the toggle's sprite sheet (43 frames, 8 across, 300 by 325 each). The build writes it into `toggle.js`.
  63. - `node tools/test.mjs http://localhost:8000/gallery/` drives every control with real touch and key events at phone width, checks form values and sideways scroll, and exits 1 on a failure. `node tools/shot.mjs URL OUT W H SCALE` takes a full-page screenshot. Both need Chrome or Chromium (`CHROME=...` if it is somewhere unusual).
  64. ## Limits
  65. - **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.
  66. - **The effects canvas sits on top of everything,** at the highest z-index, and ignores the pointer. Effects can fly over a modal or a sticky header.
  67. - **Effects behind a control are drawn inside it** (the button's and the progress bar's bursts, the five-star burst) and are cut off by a parent with `overflow: hidden`.
  68. - **Reduced motion** turns every effect off; the springs and the state changes stay.
  69. ## License
  70. MIT. See [LICENSE](LICENSE). The sound-effect lettering and the toggle frames were generated with GPT Image (through Higgsfield) for this project.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.