Bounds
Markup where the component goes, CSS in your stylesheet. No JavaScript.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/radio-boundsAbout this component
An aspect ratio picker in design-tool style: three outlined tiles, each with a dashed frame in its own proportion. The one you pick gets a blue selection box with corner handles, and its frame runs with marching ants.
Triggers
- Click
- State change
- Border
- Loop
Techniques
- SVG
- stroke-dashoffset
- Keyframes
- CSS transition
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
Native radios in a fieldset with a visually hidden legend ("Aspect ratio"), each in a <label> and named by aria-label ("Square 1:1", "Wide 16:9", "Tall 9:16"); the drawings and ratio text are aria-hidden. The focused tile is outlined.
Reduced motion
The ants stop and the handles appear at once.
Use it in anything you build, commercial and client work included. Licence