Under consideration
prop-for-that ships deliberately lean, but we considered a lot more, scrubbed from prior art (State.js, Obs.js) and extrapolated across the HTML elements. This page is the whole spectrum, from shipped to deferred to out of scope, so you can see what was weighed, and vote for what ships next.
→ Vote on the proposals board · + Propose something new
The spectrum
Section titled “The spectrum”shipped ✅ → building 🔨 → proposed 🗳️ → platform may cover 🌐 → out of scope 🚫- ✅ Shipped: in the package today.
- 🔨 v1: accepted, on the build list.
- 🗳️ Proposed: considered, not yet committed. Your votes decide.
- 🌐 Platform may cover: emerging CSS (scroll-state queries,
:fullscreen, orientation MQ) may make these redundant; still vote if you need them now. - 🚫 Out of scope: CSS or the platform already does it well.
🔨 Landing in v1
Section titled “🔨 Landing in v1”Beyond what’s already shipped, these are accepted for the first release.
- Globals:
modifiers(shift/ctrl/alt/meta),caps-lock,key-active,pointer-idle,memory,touch-points,document-size,✅ shipped,page-visible✅ shipped,page-focusedidle,selection,location,uptime,gamepad,clockangles,fpsextend,batteryextend. - Element:
viewport-pos,rect,dist-from-pointer,truncated,children,text-metrics. - Per-element:
✅ shipped,color-input✅ shipped,selectdate-input,file-input,textarea,✅ shipped as theform(completion %)form-stateplugin,meter-progress,table,audio-analyser. - Stances: a
capabilityplugin withdelivery-mode,device-capability,connection-capability,conserve(built for@container style()).
🗳️ Proposed: vote to prioritize
Section titled “🗳️ Proposed: vote to prioritize”Considered and viable, but not yet committed. Click a name to vote.
Global
Section titled “Global”| Proposal | What it would expose |
|---|---|
pointer extend | pointer-down, buttons, type, pressure, tilt (drawing UIs) |
pointer-velocity | pointer speed + angle (momentum/inertia) |
screen | screen size, avail size, colour depth (const) |
screen-orientation | physical device angle + portrait flag |
network extend | downlink-max |
motion extend | rotation rate, acceleration incl. gravity |
geo extend | altitude, heading, speed |
light | ambient light lux (rare support) |
gyroscope / magnetometer / gravity | Generic Sensor API |
js-memory | heap used / heap % (Chromium-only) |
date | calendar parts: weekday, day, month, year, day-of-year, days-in-month, is-weekend, is-am (the calendar companion to clock’s time-of-day) |
input-modality | whether the last input was keyboard / mouse / touch / pen — adaptive density, hit-targets, and focus rings beyond what :focus-visible scopes |
interacted | --const-interacted latches on the first user gesture — “tap to start” overlays, autoplay/audio unlock, deferring heavy work until engagement |
drag-state | a drag op is in progress (global dragging); per-element drag-over (valid drop target) and dragging-self — no CSS pseudo exists for these |
intl | FOUC-safe i18n consts: timezone offset, first weekday, 12/24-hour, lang (so a date-driven calendar starts the week correctly) |
storage | quota usage % + persisted flag (navigator.storage.estimate) — “almost full” warnings, gating offline features |
permissions | granted / denied / prompt per permission (notifications, camera, mic, geo) — show an “enable” nudge only while the state is prompt |
responsiveness | main-thread-busy from PerformanceObserver longtask — back off effects when janky (distinct from fps cadence and cpu-pressure tier) |
modifier-locks extend | num-lock, scroll-lock alongside the v1 caps-lock (one getModifierState call) |
navigationnav-type plugin | --const-nav-type (navigate / reload / back_forward / prerender, from performance.getEntriesByType('navigation')[0].type) — branch styling on how the user arrived. Rides the writer (lands post-paint); read the same value in a <head> script for a pre-paint constant |
page-lifecycle | the suspension layer beneath page-visible: --const-bfcache-restored (latches when the page was restored from the back/forward cache, via pageshow.persisted) and --live-frozen (Page Lifecycle freeze/resume) |
user-activation | --live-user-active from navigator.userActivation.isActive (transient activation) — the live “interacting right now” complement to the sticky interacted latch, for gating autoplay / audio-unlock windows |
Why not pageswap / pagereveal? Those cross-document View Transition hooks fire before the first rendering opportunity and exist to configure or skip a transition imperatively — the opposite of this library’s read-state-then-rAF-flush model, which writes after paint. The one durable thing worth reading at that moment, how the user arrived, is surfaced synchronously instead via the navigation const above.
Element & per-element
Section titled “Element & per-element”| Proposal | What it would expose |
|---|---|
size extend | content box, inline/block size |
visibility extend | in-viewport, time-visible, fully-visible |
field extend | remaining, fill-pct, granular validity flagsfield plugin; focused still proposed (and the field-state plugin ships the interaction states: dirty/pristine, touched/untouched, changed, submitted) |
media extend | buffered, played, muted, rate, ended, seeking, video dims, PiP |
canvas | canvas width / height |
link | external, current (nav highlighting) |
caret | caret position, selection range |
field-state extend | [contenteditable] support — dirty / changed / touched for rich-text editors, which CSS can’t see |
img-color extend | palette beyond the dominant colour: secondary/accent swatches, average vs. dominant (the img-color plugin ships the dominant colour today) |
🌐 The platform may cover these
Section titled “🌐 The platform may cover these”Emerging CSS may make these redundant; they’re listed for transparency. Vote if you need them before browser support lands.
| Proposal | Native alternative |
|---|---|
scroll-state (scrolled, at-top, at-bottom) | scroll-state() container queries |
overflow (is-overflowing) | scroll-state() queries |
scrollable | scroll-state() queries |
stuck (sticky-stuck) | scroll-state(stuck) |
fullscreen | :fullscreen |
orientation-layout (landscape) | orientation media query |
details (open) | [open] / :modal |
anim-state (animating) | none yet |
🚫 Out of scope
Section titled “🚫 Out of scope”CSS or the platform already does these well, so prop-for-that won’t duplicate them:
- Interaction states:
:hover,:focus,:focus-within,:focus-visible,:active,:checked,:disabled,:required,:placeholder-shown,:empty,:has(),[open],:modal,:fullscreen,:popover-open. - Preferences:
prefers-color-scheme,prefers-reduced-motion,prefers-reduced-data,prefers-contrast,forced-colors,inverted-colors. - Layout queries: media / container /
@container style()queries;orientation,resolution,aspect-ratioMQ. - Units:
vw/vh/dvh/svh/lvh/vmin/vmax,cqw/cqh,env()safe-area insets. - Scroll-linked: scroll position/progress →
animation-timeline: scroll()/view()(compositor-driven, no library needed).