API reference
rx
API reference for the `rx` (React Expand) function, used for dynamic styling.
Pass dynamic variables such as useState to static css variables from inline styles and reference the dynamic values from your static stylesheet.
To use rx
, pass your static css.props()
result as the first argument, and an object of CSS variables as the second.
Example
Use sparingly
rx()
is powerful, but it comes with a small runtime cost due to inline styles. For styles that are not dynamic, prefer using static variants with css.create()
and css.props()
wherever possible.