Skip to content

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

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.

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, page-visible ✅ shipped, page-focused ✅ shipped, idle, selection, location, uptime, gamepad, clock angles, fps extend, battery extend.
  • Element: viewport-pos, rect, dist-from-pointer, truncated, children, text-metrics.
  • Per-element: color-input ✅ shipped, select ✅ shipped, date-input, file-input, textarea, form (completion %) ✅ shipped as the form-state plugin, meter-progress, table, audio-analyser.
  • Stances: a capability plugin with delivery-mode, device-capability, connection-capability, conserve (built for @container style()).

Considered and viable, but not yet committed. Click a name to vote.

ProposalWhat it would expose
pointer extendpointer-down, buttons, type, pressure, tilt (drawing UIs)
pointer-velocitypointer speed + angle (momentum/inertia)
screenscreen size, avail size, colour depth (const)
screen-orientationphysical device angle + portrait flag
network extenddownlink-max
motion extendrotation rate, acceleration incl. gravity
geo extendaltitude, heading, speed
lightambient light lux (rare support)
gyroscope / magnetometer / gravityGeneric Sensor API
js-memoryheap used / heap % (Chromium-only)
datecalendar 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-modalitywhether 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-statea drag op is in progress (global dragging); per-element drag-over (valid drop target) and dragging-self — no CSS pseudo exists for these
intlFOUC-safe i18n consts: timezone offset, first weekday, 12/24-hour, lang (so a date-driven calendar starts the week correctly)
storagequota usage % + persisted flag (navigator.storage.estimate) — “almost full” warnings, gating offline features
permissionsgranted / denied / prompt per permission (notifications, camera, mic, geo) — show an “enable” nudge only while the state is prompt
responsivenessmain-thread-busy from PerformanceObserver longtask — back off effects when janky (distinct from fps cadence and cpu-pressure tier)
modifier-locks extendnum-lock, scroll-lock alongside the v1 caps-lock (one getModifierState call)
navigation ✅ shipped as the nav-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-lifecyclethe 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.

ProposalWhat it would expose
size extendcontent box, inline/block size
visibility extendin-viewport, time-visible, fully-visible
field extendremaining, fill-pct, granular validity flags ✅ shipped in the field plugin; focused still proposed (and the field-state plugin ships the interaction states: dirty/pristine, touched/untouched, changed, submitted)
media extendbuffered, played, muted, rate, ended, seeking, video dims, PiP
canvascanvas width / height
linkexternal, current (nav highlighting)
caretcaret position, selection range
field-state extend[contenteditable] support — dirty / changed / touched for rich-text editors, which CSS can’t see
img-color extendpalette beyond the dominant colour: secondary/accent swatches, average vs. dominant (the img-color plugin ships the dominant colour today)

Emerging CSS may make these redundant; they’re listed for transparency. Vote if you need them before browser support lands.

ProposalNative alternative
scroll-state (scrolled, at-top, at-bottom)scroll-state() container queries
overflow (is-overflowing)scroll-state() queries
scrollablescroll-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

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-ratio MQ.
  • 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).