Sum

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-sum

About 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

More inputs

See all
SwissGet code
TapeGet code
TerrazzoGet code
VaultGet code