StyleX is the styling system for ambitious user interfaces.
StyleX is the styling system for ambitious user interfaces.
StyleX is a JavaScript library for defining styles for optimized user interfaces.
Documentation for individual packages can be found in their respective README
files. Start with
@stylexjs/stylex.
Here is a simple example of StyleX use:
import * as stylex from '@stylexjs/stylex';
const styles = stylex.create({
root: {
padding: 10,
},
element: {
backgroundColor: 'red',
},
});
const styleProps = stylex.props(styles.root, styles.element);This is the development monorepo for StyleX.
.githubexamplespackagesFirst, yarn install the yarn workspace.
buildyarn build to run the build script in every package.yarn workspace <package-name> build to run the build script for a
specific package.testyarn test to run tests for every package.yarn workspace <package-name> test to run the test script for a
specific package. More details can be found in the contributing guide below.Development happens in the open on GitHub and we are grateful for contributions including bug fixes, improvements, and ideas.
This project expects all participants to adhere to Meta's OSS Code of Conduct. Please read the full text so that you can understand what actions will and will not be tolerated.
Read the contributing guide to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.
Before proposing a change or addition to the StyleX API, you should familiarize yourself with the goals and architectural principles of the project.
StyleX is MIT licensed.
[unplugin] Vite dev: CSS for a lazily loaded module is applied after the module has evaluated
[unplugin] CSS-only change renames the CSS asset but not the chunk that references it
Bun media query parser sometimes consumes EOF token as trailing syntax
[babel-plugin] `firstThatWorks('var(--z)', 100)` throws `varName.startsWith is not a function`
[unplugin] Vite dev on Windows: runtime/CSS URLs built with path.join reach the browser as "\\virtual:…" and never load
[unplugin] Vite dev: import walk calls this.load() on dependencies (react), deadlocking the cold-start dependency optimizer
Support boolean evaluation for media features like `@media (prefers-reduced-motion)`
Container query order is not preserved.
Transformed media queries leave gaps between breakpoints
[roadmap] StyleX v1.0.0