Holding
Cell
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCardCell(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/card-cellAbout this component
A standing battery filled with waving liquid that runs from red through amber to green as the level climbs. Press the plug under it and it snaps up into the battery's port and charges, a pulse running up its cable; press it again and it pulls out. Drag the battery to set a level.
Triggers
- State change
- Click
- Continuous
- Fill
- Loop
- Card
- 3D
Techniques
- CSS variables
- Keyframes
- Interval
- Event position
- clip-path
- CSS transition
- SVG
- Gradient
- Spring
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
The battery is a role='slider' with aria-valuenow and an aria-valuetext that says 'charging'; arrow keys step 5%, Home and End go to 0 and 100. The plug is a native button labelled 'Charge' that exposes aria-pressed, and its focus ring is drawn round the plug and moves with it.
Reduced motion
Reduced motion removes the waves, bubbles, spark, pulse and transitions; the plug still seats and the level still changes.
Use it in anything you build, commercial and client work included. Licence