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);