Skip to content

Conversation

@nmn
Copy link
Collaborator

@nmn nmn commented Jan 25, 2026

What changed / motivation ?

Brings back stylex.attrs which works like stylex.props but instead of returning an object with className string and a style object, it returns an object with class and style strings.

This API makes it simpler and easier to use StyleX with UI libraries such as Solid.js, Qwik.js, Svelte, Vue and others.


TODO:

  • Looking for ways to further refactor the code to simplify and improve types.
@vercel
Copy link

vercel bot commented Jan 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
stylex Ready Ready Preview, Comment Jan 25, 2026 9:04am

Request Review

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 25, 2026
@nmn nmn removed the request for review from necolas January 25, 2026 09:04
@github-actions
Copy link

workflow: benchmarks/perf

Comparison of performance test results, measured in operations per second. Larger is better.
yarn workspace v1.22.22
yarn run v1.22.22
$ node ./compare.js /tmp/tmp.YU0kwlAxdd /tmp/tmp.2eAmfuXv8Y

Results Base Patch Ratio
babel-plugin: stylex.create
· basic create 552 541 0.98 -
· complex create 67 66 0.99 -
babel-plugin: stylex.createTheme
· basic themes 440 437 0.99 -
· complex themes 33 34 1.03 +
Done in 0.08s.
Done in 0.31s.
@github-actions
Copy link

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
yarn workspace v1.22.22
yarn run v1.22.22
$ node ./compare.js /tmp/tmp.q2cdHfRNz7 /tmp/tmp.i19HOFFX3C

Results Base Patch Ratio
@stylexjs/stylex/lib/cjs/stylex.js
· compressed 1,311 1,389 1.06 !!
· minified 4,150 4,372 1.05 !!
@stylexjs/stylex/lib/cjs/inject.js
· compressed 1,793 1,793 1.00
· minified 4,915 4,915 1.00
benchmarks/size/.build/bundle.js
· compressed 496,650 496,650 1.00
· minified 4,847,840 4,847,840 1.00
benchmarks/size/.build/stylex.css
· compressed 99,853 99,853 1.00
· minified 747,541 747,541 1.00
Done in 0.08s.
Done in 0.31s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

2 participants