11 of 12 · two lines of six
Date blocks
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldPerpetual(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-perpetualAbout 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 all25 of 60 · finish a word to lift it
The planchette is moving…