Date blocks

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-perpetual

About this component

A date field made as a wooden perpetual calendar: two real cubes (0 to 5, and 0, 1, 2, 6, 7, 8 with the 6 turned for a 9) tumble to the day and hop over each other when the digits need swapping, and the month block rolls over.

Dependencies
None
Difficulty
Advanced
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers3

  • State change
  • 3D
  • Spring

Techniques3

  • preserve-3d
  • 3D transform
  • Perspective

Accessibility

Keyboard and screen readers

Two native inputs with role="spinbutton": Day (1 to the month length) and Month (aria-valuetext gives its name). Arrow keys step, digits and month initials type, left and right move between them; the blocks are aria-hidden.

Reduced motion

Everything changes at once, without the motion.

Use it in anything you build, commercial and client work included. Licence

More inputs

See all
Pin artGet code

25 of 60 · finish a word to lift it

PlacardGet code

The planchette is moving…

Talking boardGet code
Shop windowGet code