# @stylexjs/shared

Latest version **0.19.1** (published 2026-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @stylexjs/shared
pnpm add @stylexjs/shared
yarn add @stylexjs/shared
bun add @stylexjs/shared
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.19.1 |
| Published | 2026-09-15 |
| First published | 2022-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 31 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10348 |
| Maintainers | vincentriemer, anaybucket, naman34, necolas, mellyeliu |

## Links

- npm: https://www.npmjs.com/package/@stylexjs/shared
- Repository: https://github.com/facebook/stylex
- Homepage: https://github.com/facebook/stylex#readme
- Issues: https://github.com/facebook/stylex/issues
- npm.io page: https://npm.io/package/@stylexjs/shared

## Recent versions

- 0.19.1 (latest) — 2026-09-15
- 0.10.0-beta.2 (beta) — 2024-11-28
- 0.5.0-alpha.4 (alpha) — 2024-01-17
- 0.19.0 — 2026-06-16
- 0.18.3 — 2026-04-20
- 0.18.2 — 2026-03-27
- 0.18.1 — 2026-03-06
- 0.18.0 — 2026-03-04
- 0.17.5 — 2026-01-13
- 0.17.4 — 2025-12-18
- 0.17.3 — 2025-12-13
- 0.17.2 — 2025-12-02
- 0.17.1 — 2025-11-29
- 0.17.0 — 2025-11-18
- 0.12.0 — 2025-04-11
- … 52 more at https://npm.io/package/@stylexjs/shared/versions

## README

# StyleX &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/stylex/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/@stylexjs/stylex.svg?style=flat)](https://www.npmjs.com/package/@stylexjs/stylex) [![tests](https://github.com/facebook/stylex/actions/workflows/tests.yml/badge.svg)](https://github.com/facebook/stylex/actions/workflows/tests.yml) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/facebook/stylex/blob/main/.github/CONTRIBUTING.md)

StyleX is a JavaScript library for defining styles for optimized user
interfaces.

## Documentation

[Documentation Website](https://stylexjs.com)

Documentation for individual packages can be found in their respective README
files. Start with
[`@stylexjs/stylex`](https://github.com/facebook/stylex/blob/main/packages/@stylexjs/stylex).

### Example

Here is a simple example of StyleX use:

```js
import * as stylex from '@stylexjs/stylex';

const styles = stylex.create({
  root: {
    padding: 10,
  },
  element: {
    backgroundColor: 'red',
  },
});

const styleProps = stylex.props(styles.root, styles.element);
```

## Development

This is the development monorepo for StyleX.

### Structure

- `.github`
  - Contains workflows used by GitHub Actions.
  - Contains issue templates and contribution guidelines.
- `examples`
  - Contains examples using StyleX and its integration with build tools.
- `packages`
  - Contains the public and private packages managed in the monorepo.
  - [babel-plugin](https://github.com/facebook/stylex/blob/main/packages/@stylexjs/babel-plugin)
  - [benchmarks](https://github.com/facebook/stylex/blob/main/packages/benchmarks)
  - [cli](https://github.com/facebook/stylex/blob/main/packages/@stylexjs/cli)
  - [docs](https://github.com/facebook/stylex/blob/main/packages/docs)
  - [eslint-plugin](https://github.com/facebook/stylex/blob/main/packages/@stylexjs/eslint-plugin)
  - [postcss-plugin](https://github.com/facebook/stylex/blob/main/packages/@stylexjs/postcss-plugin)
  - [rollup-plugin](https://github.com/facebook/stylex/blob/main/packages/@stylexjs/rollup-plugin)
  - [scripts](https://github.com/facebook/stylex/blob/main/packages/scripts)
  - [shared](https://github.com/facebook/stylex/blob/main/packages/@stylexjs/babel-plugin/shared)
  - [style-value-parser](https://github.com/facebook/stylex/blob/main/packages/style-value-parser)
  - [stylex](https://github.com/facebook/stylex/blob/main/packages/@stylexjs/stylex)


### Tasks

First, `yarn install` the yarn workspace.

- `build`
  - Use `yarn build` to run the build script in every package.
  - Use `yarn workspace <package-name> build` to run the build script for a
    specific package.
- `test`
  - Use `yarn test` to run tests for every package.
  - Use `yarn workspace <package-name> test` to run the test script for a
    specific package. More details can be found in the contributing guide below.

## Contributing

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](https://opensource.fb.com/code-of-conduct/). Please read
the full text so that you can understand what actions will and will not be
tolerated.

### Contributing Guide

Read the
[contributing guide](https://github.com/facebook/stylex/blob/main/.github/CONTRIBUTING.md)
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
[goals and architectural principles](https://stylexjs.com/docs/learn/thinking-in-stylex/)
of the project.

### License

StyleX is [MIT licensed](./LICENSE).

---
_Source: https://npm.io/package/@stylexjs/shared · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
