Smooth Caret

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-caret

About this component

The text caret glides instead of jumping. Every move (typing, arrow keys, clicking, Home and End) slides a custom caret to its new place and leaves a short comet streak behind it that fades; it blinks only once it is resting. Selections fall back to the native highlight.

Triggers

  • Focus
  • Continuous
  • Glow

Techniques

  • CSS variables
  • CSS transition
  • Keyframes
  • Gradient

Difficulty

Advanced

Accessibility

Keyboard and screen readers

A real labelled input; only the caret's drawing changes, so typing, selection and assistive tech behave normally.

Reduced motion

The caret moves without gliding and there is no streak.

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

More inputs

See all
Tags
    Tag ChipsGet code
    Code SlotsGet code
    Did the build pass?
    All green. Shipping now
    ComposerGet code
    Drop LettersGet code