PO

Postcss Js

postcss-js

PostCSS for CSS-in-JS and styles in JS objects

Utilities
postcss
postcss-runner
js
inline
react
css
cssinjs
postcss-js
Utilities
javascript
Stars
1
Weekly
0
Open issues
0
Bundle
~60 kB

Installation

npm install postcss-js

Code example

import { usePostcssJs } from "postcss-js";

export function Example() {
  const value = usePostcssJs();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by Andrey Sitnik
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 0 open issues on GitHub

FAQs

Alternatives & similar libraries