Write CSS in JS and get real CSS files during build. Use dynamic prop-based styles with the React bindings and have them transpiled to CSS variables automatically. Great productivity with source maps and linting support. Write CSS in JS, but with zero runtime, CSS is extracted to CSS files during build. Use dynamic prop-based styles with the React bindings, uses CSS variables behind the scenes. Optionally use any CSS preprocessor such as Sass or PostCSS. Easily find where the style was defined with CSS source maps. Linaria currently supports webpack and Rollup to extract the CSS at build time. Optionally, add the @linaria preset to your Babel configuration at the end of the presets list to avoid errors when importing the components in your server code or tests. Linaria can be used with any framework, with additional helpers for React.
Features
- Write CSS in JS, but with zero runtime, CSS is extracted to CSS files during build
- Familiar CSS syntax with Sass like nesting
- Use dynamic prop based styles with the React bindings, uses CSS variables behind the scenes
- Easily find where the style was defined with CSS sourcemaps
- Lint your CSS in JS with stylelint
- Use JavaScript for logic, no CSS preprocessor needed