prop-for-that
argyleink/prop-for-that · Public GitHub repository
what JS knows, now CSS knows
Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

About this project
Author-written excerpt from the project README.
Expose what JavaScript knows but CSS can't see — as live CSS custom properties.
Sliders, pointer position, element visibility, viewport size, battery, network, sensors — JavaScript can read all of it; CSS can't. prop-for-that writes that runtime state into --live- and --const- custom properties — batched and diffed down to one setProperty per frame — so your CSS can compose and react to it with plain calc() and var().
Zero dependencies. TypeScript. ESM + CJS. SSR-safe.
- CSS does the work. No per-element event handlers or render loops — bind once, compose in stylesheets.
- Fast by design. One requestAnimationFrame flush per frame — idle when nothing changes, frozen while the tab is hidden — plus write-on-change diffing and a single shared ResizeObserver / IntersectionObserver for the…
- Ship only what you use. Four lightweight core sources are built in; everything else is an opt-in, tree-shakeable plugin — and under auto each plugin loads on demand, the moment a data-props-for attribute asks for it.
- Plays with the platform. Opt into typed @property values for interpolation, or FOUC-safe constants written before first paint.
- Tiny and dependency-free, in every bundle format.
Requirements and intended audience
Expose what JavaScript knows but CSS can't see — as live CSS custom properties.
Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.
Statements extracted from the author’s documentation · Checked 2026-10-29. Source: https://github.com/argyleink/prop-for-that/blob/main/README.md
Recorded maintenance information
Last recorded source update: 2026-07-25. Saved release: v0.7.12 · 2026-07-25. These dates do not guarantee ongoing maintenance.
- Technologies
- TypeScript
- Licence
- MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
- Demo check
- A public page loaded on 2026-11-16. This does not test every feature.
Browse related categories
More projects to explore
hyperframes
heygen-com/hyperframes
Open-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
archify
tt-a1i/archify
Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
AdminLTE
ColorlibHQ/AdminLTE
AdminLTE - Free admin dashboard template based on Bootstrap 5
ppt-master
hugohe3/ppt-master
AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He