Draft

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-draft

About this component

A width field on drafting blue, drawn as a dashed white box with corner crosshairs and its unit at the end. Focus rules a dimension line across the top, arrowheads and all, while the dashes start to march.

Triggers

  • Focus
  • Draw
  • Border
  • Keyframe

Techniques

  • SVG stroke
  • stroke-dashoffset
  • Keyframes
  • clip-path

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native text input with a decimal keypad inside a <label>, named by aria-label ("Width in millimetres"); the drawing and the unit mark are aria-hidden.

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
E-inkGet code
FoilGet code
FoldGet code
JellyGet code