Smooth Caret
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldCaret(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-caretAbout 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