Photo
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCbPhoto(el) on the mounted element instead.
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/checkbox-photoAbout this component
Multi-select on a photo grid: a picked photo pulls in from the edges of its tile, a check pops into its corner, and the count above updates.
- Dependencies
- None
- Difficulty
- Intermediate
- Reduced motion
- Respected
- Theme
- Light and dark
- Follows page color-scheme
Triggers3
- Click
- State change
- Hover
Techniques3
- CSS transition
- Gradient
- Keyframes
Accessibility
Keyboard and screen readers
Each photo is a native checkbox named with aria-label, in a role="group"; the count is a polite live region. :has(:focus-visible) outlines the tile.
Reduced motion
There is no spring or pop.
Use it in anything you build, commercial and client work included. Licence