Sum
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldSum(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/input-sumAbout this component
An amount field in two inks only: a solid currency tile and big tabular numerals, with a block cursor blinking where the amount starts. Digits are grouped in thousands as you type, the tile kicks on every keystroke, and focus runs a thick rule out under the number.
Triggers
- Focus
- State change
- Keyframe
- Spring
Techniques
- CSS variables
- Keyframes
- CSS transition
- Radial gradient
- Pseudo elements
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
A native text input with inputmode decimal inside a <label>, named by aria-label ("Amount in dollars"); the tile, cursor and rule are aria-hidden. Keyboard focus outlines the whole field through :has(:focus-visible).
Reduced motion
Every transition and animation is switched off.
Use it in anything you build, commercial and client work included. Licence