MistCSS

Write atomic React components using only CSS! (JS-from-CSS)

README

MistCSS 🌬️


Node.js CI

Write React components using CSS only


MistCSS is a new, better and faster way to write visual components. CSS-in-JS? Nope! JS-from-CSS 👍

View the site to learn more.

Supports Next.js, Remix and TailwindCSS. More to come.

Paragraph.mist.css

  1. ```css
  2. @scope (.paragraph) {
  3.   p:
  4.     color: black;

  5.     &[data-error] {
  6.       color: red;
  7.     }
  8.   }
  9. }
  10. ```

App.jsx

  1. ```jsx
  2. import { Paragraph } from 'Paragraph.mist.css'

  3. export default const App = () => (
  4.   <main>
  5.     <Paragraph>I'm a React component written in CSS only</Paragraph>
  6.     <Paragraph error>props can be passed</Paragraph>

  7.     {/* 💥 TypeScript will catch errors */}
  8.     <Paragraph eror>typo</Paragraph>
  9.     <Paragraph type="button">invalid prop</Paragraph>
  10.   </main>
  11. )
  12. ```

Documentation


https://typicode.github.io/mistcss

Why the name?


C in CSS stands for cascade 🌊 → atomized water forms mist 🌫️ → MistCSS creates pure CSS atomic components 🌬️