@ai.to.design/prototype
v1.6.3
Published
In-browser variant-picker runtime for ai.to.prototype: renders a carousel toolbar to flip through generated UI component variants via data-aitd-* attributes.
Downloads
601
Maintainers
Readme
@ai.to.design/prototype
In-browser variant-picker runtime for the ai-to-prototype Claude Code plugin.
It renders a carousel toolbar that lets you flip through generated UI component variants.
The prototype skill injects the built bundle into a page temporarily while you pick variants, then strips it out on cleanup.
What it is
A single self-contained IIFE (dist/prototype.min.js, ~8 KB, no dependencies) that scans the DOM for data-aitd-* attributes and mounts a variant picker.
Contract
The runtime discovers variants via data attributes on the page:
- Container:
data-aitd-variants - Per variant:
data-aitd-variant(1-based index),data-aitd-label, optionaldata-aitd-description - Optional container config:
data-aitd-transition,data-aitd-theme,data-aitd-position,data-aitd-branding - Managed at runtime:
data-aitd-activeon the visible variant
See the DOM contract for the full spec.
License
MIT
