LeaVerou/stretchy
Form element autosizing, the way it should be observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4057
- days_rel: n/a
- days_push: 992
- n_releases_24m: 0
Adoption not part of the score
1273 stars · 84 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Stretchy is a tiny standalone JavaScript library that automatically autosizes HTML form controls such as textareas, text inputs, and select menus. It works via a simple script include or ESM/CJS import, requires no configuration, and adapts to dynamically added elements using mutation observers.
Use cases
- autosize textareas to fit their content
- make text inputs grow with typed text
- resize select menus to fit their selected option
- autosize form controls added dynamically to the page
- autosize form controls inside shadow DOM web components
- restrict autosizing to specific form controls via a CSS selector
When to choose
- you want dependency-free, tiny (<1.5KB) form autosizing
- you need autosizing to work with plain HTML without writing JavaScript
- you need it to respect existing CSS constraints like min/max width and transitions
- you use web components and need Shadow DOM support
When to avoid
- you need a full form validation or form-building framework
- your project already uses a large UI framework with built-in autosizing components
- you need to support very old browsers not covered by v2
Facets
library · maturity maintenance
ui-components form-handling web-development frontend browser autosizing form-controls vanilla-js no-dependencies shadow-dom nodejs
4 sources
- readme: https://github.com/LeaVerou/stretchy · fetched 2026-08-28 · f85cf4717050
- homepage: https://stretchy.verou.me/ · fetched 2026-08-29 · 20e3fb4afc26
- registry_npm: https://registry.npmjs.org/stretchy · fetched 2026-08-29 · 46085c2dfa42
- site_page: http://lea.verou.me/2015/07/stretchy-form-element-autosizing-the-way-it-should-be · fetched 2026-08-29 · 7fee3a5942ad
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| LeaVerou/stretchy | main | 23 |
For agents
markdown · JSON · MCP: product_card(name="LeaVerou/stretchy")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem