StyleX is the styling system for ambitious user interfaces.



StyleX is a JavaScript library for defining styles for optimized user


Documentation for individual packages can be found in their respective README
files. Start with


Here is a simple example of stylex use:

  1. ```js
  2. import stylex from '@stylexjs/stylex';

  3. const styles = stylex.create({
  4.   root: {
  5.     padding: 10,
  6.   },
  7.   element: {
  8.     backgroundColor: 'red',
  9.   },
  10. });

  11. const styleProps = stylex.apply(styles.root, styles.element);
  12. ```


This is the development monorepo for stylex.


- .github
  - Contains workflows used by GitHub Actions.
  - Contains issue templates and contribution guidelines.
- apps
  - Contains example apps using stylex and integration with build tools.
- packages
  - Contains the individual packages managed in the monorepo.
  - shared
  - stylex


First, npm install the npm workspace.

- build
  - Use npm run build to run the build script in every package.
- Use `npm run build -w ` to run the build script for a specific
- test
  - Use npm run test to run tests for every package.
- Use `npm run test -w ` 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.

Code of Conduct

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

Contributing Guide

Read the
to learn about our development process, how to propose bug fixes and
improvements, and how to build and test your changes.

Architectural Principles

Before proposing a change or addition to the StyleX API, you should familiarize
yourself with the
of the project.


StyleX is MIT licensed.