HaecheonLee / mistcss

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

Home Page:https://typicode.github.io/mistcss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

💧 MistCSS

Node.js CI

Write components using CSS only

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

Write your component in CSS only

@scope (button.custom-button) {
  :scope {
    background: black;
    color: white;

    &[data-variant="primary"] {
      background: blue;
    }

    &[data-variant="secondary"] {
      background: gray;
    }
  }
}

Get a type-safe component without writing TypeScript

import { CustomButton } from './Button.mist'

export const App = () => (
  <CustomButton variant="primary">Save</CustomButton>
)

You can create React, Astro and Hono components. You can also use Tailwind CSS.

Documentation

https://typicode.github.io/mistcss

Supports

About

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

https://typicode.github.io/mistcss

License:MIT License


Languages

Language:JavaScript 100.0%