Skip to content
caliper ui docs

Pro

Glide caret

A text area whose caret glides. It slides to each new place in about a tenth of a second, down a line on Enter and back with the arrows, then blinks when you stop.

Pro
pnpm dlx shadcn@latest add @caliper/glide-caret

Notes

Type, press Enter and move with the arrow keys.

Installs components/ui/glide-caret.tsxDepends on none beyond ReactMotion shared motion tokens

When to use

Use it for

  • Writing surfaces and note apps where typing is the product.
  • Comment boxes and editors that want a quiet signature detail.

Skip it when

  • Code editors; the caret must be exact on every keystroke.
  • Single-line fields; they gain little.

Decisions

Why it is built this way, so you know what to keep when you change your copy.

Behaviour

Drawn over the real caret
The text is laid out in a hidden twin to find the caret's place; the native caret is only made transparent, so selection, IME and spell check are untouched.
Solid while moving
It stops blinking while it moves and starts again half a second after, as native carets do.

Usage

Native under reduced motion
With reduced motion the browser's own caret is shown and the drawn one is removed.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/glide-caret

Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source. It is built from GlideCaret and caretBox.

example.tsx
import { GlideCaret, caretBox } from "@/components/ui/glide-caret"

The worked example comes with Pro

The 23-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

GlideCaret

component

No props of its own; it accepts the native props of its root element.

caretBox

component

No props of its own; it accepts the native props of its root element.

Accessibility

It is built on native elements and keeps aria-hidden in step with state.

No custom key handling; Tab and the native activation keys do the work.

Motion

Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.

All Text motion examples