Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@linaria/shaker

callstack218.2kMIT5.0.3TypeScript support: included

Blazing fast zero-runtime CSS in JS library

babel, babel-plugin, css, css-in-js, linaria, react, styled-components

readme

Linaria

Zero-runtime CSS in JS library.


📖 Please refer to the GitHub for full documentation.

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
  • Optionally use any CSS preprocessor such as Sass or PostCSS

Why use Linaria

Installation

npm install @linaria/core @linaria/react @linaria/babel-preset

or

yarn add @linaria/core @linaria/react @linaria/babel-preset