# ichord/Caret.js

Get caret postion and offset from text field

Repository: https://github.com/ichord/Caret.js
Canonical: https://ross.abutalabs.com/products/caretjs
Homepage: http://ichord.github.com/Caret.js
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2018-11-28T00:12:33+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4911, "days_push": 2836, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1051, forks 161 (observed 2026-08-28T04:03:23.228247+00:00)

## What it is
A jQuery plugin that retrieves the caret position and offset from text inputs and textareas, and can also set caret positions. It powers At.js and supports iframe contexts.

## Use cases
- get caret pixel position in a text input
- position an autocomplete dropdown next to the caret
- get or set the caret character index in a textarea
- compute caret coordinates inside an iframe editor
- build mention or emoji popup UIs in text fields

## When to choose
- you need pixel coordinates of the caret in inputs or textareas
- you already use jQuery and At.js-style autocomplete
- you need to programmatically move the caret to a character index

## When to avoid
- your project does not use jQuery
- you need modern framework-native caret utilities (React/Vue)
- you need active maintenance - the last release was 2018

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, developer-tools
- domain: frontend, web-development, text-editors
- platform: browser
- tags: jquery-plugin, caret-position, contenteditable, at-js-dependency, text-input, javascript, jquery

## Member repositories
- ichord/Caret.js (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:23.228247+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:00:04.369073+00:00, confidence not recorded.
  - readme: https://github.com/ichord/Caret.js (fetched 2026-08-28T04:03:23.228247+00:00, sha c4a76a9bad95)
- Data as of 2026-08-30T08:39:29.467469+00:00.
