Zero-runtime CSS In JS Library For React – linaria

Description:

Zero-runtime CSS in JS library for React.

Linaria lets you write CSS code in a tagged template literal in your JavaScript files. The Babel plugin extracts the CSS rules to real CSS files, and generates unique class names to use.

Features:

  • Familiar CSS syntax with Sass like nesting.
  • CSS is extracted at build time, no runtime is included.
  • JavaScript expressions are supported and evaluated at build time.
  • Critical CSS can be extracted for inlining during SSR.
  • Integrates with existing tools like Webpack to provide features such as Hot Reload.

Installation:

# Yarn
$ yarn add linaria

# NPM
$ npm install linaria –save

Preview:

linaria

Add Comment