https://github.com/tinyhref/use-stylex
A utility that makes using Facebook's StyleX easier, with support for Tailwind-style syntax
https://github.com/tinyhref/use-stylex
stylex tailwind tailwindcss use-stylex
Last synced: 3 months ago
JSON representation
A utility that makes using Facebook's StyleX easier, with support for Tailwind-style syntax
- Host: GitHub
- URL: https://github.com/tinyhref/use-stylex
- Owner: tinyhref
- License: mit
- Created: 2025-05-18T09:50:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-23T17:53:17.000Z (11 months ago)
- Last Synced: 2025-10-04T17:14:51.964Z (8 months ago)
- Topics: stylex, tailwind, tailwindcss, use-stylex
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# use-stylex
## Installation
```bash
npm install use-stylex
or
yarn add use-stylex
```
## Use It
```js
import * as stylex from '@stylexjs/stylex';
import { useStyleX } from 'use-stylex';
const styles = stylex.create({
wrapper: {
position: 'relative'
},
base: {
display: 'flex',
color: '#fff'
},
primary: {
color: 'blue'
}
})
const Component = () => {
const { classes } = useStyleX(styles);
return (
Component
)
}
```