soulwire/fit.js
Fit things into other things observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4610
- days_rel: n/a
- days_push: 3234
- n_releases_24m: 0
Adoption not part of the score
1881 stars · 102 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Fit.js is a tiny JavaScript library that scales and aligns one rectangular object (DOM element or plain rect) to fit inside another while preserving aspect ratio. It supports cover/contain modes, alignment options, resize watching, and custom transform callbacks.
Use cases
- fit a video or image inside a container while keeping aspect ratio
- scale text to fill its parent element
- implement cover/contain behavior like CSS object-fit with alignment control
- refit elements automatically on window resize
- fit arbitrary rectangle objects in canvas or game layouts
When to avoid
- you need modern CSS object-fit which covers most DOM cases
- you need responsive layout systems or grid frameworks
- the project needs actively maintained dependencies
Facets
library · maturity maintenance
ui-components graphics web-development frontend browser aspect-ratio dom-layout scaling cover-contain micro-library javascript
1 source
- readme: https://github.com/soulwire/fit.js · fetched 2026-08-28 · 3249ba772f30
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| soulwire/fit.js | main | 32 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem