Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

macaron

> 前端框架
Open source

Compiler-augmented typesafe CSS-in-JS with zero runtime, colocation, maximum safety and productivity

786 stars0 likes2 views
WebsiteGitHub

About

Compiler-augmented typesafe CSS-in-JS with zero runtime, colocation, maximum safety and productivity

CSS-in-JS with zero runtime, type safety and colocation

Features

  • Zero runtime bundles with build time style extraction.
  • Colocation of styles and components.
  • First class Typescript support.
  • Supports both styled-components API and vanilla styling API.
  • Stitches-like variants API.
  • Out of box support for React, Solid and Qwik.
  • Integrations for esbuild and Vite.

Documentation

For full documentation, visit https://macaron.js.org

Example

Styled API

…

Styling API

The styling API is the same api is vanilla-extract, but allows styles to be defined in the same file, improving the DX.

Check out vanilla-extract docs for the API reference.

These functions can also be called directly inside expressions to provide a css prop-like API with zero-runtime cost:-

javascript
import { style } from '@macaron-css/core';

function App() {
  return (
    

  );
}

Playground

You can try about these above examples at https://macaron.js.org/playground and see how macaron figures out which expressions have to be extracted and what your code would look like after being transpiled

How it works

https://macaron.js.org/docs/working/

Acknowledgements

  • Vanilla Extract Thanks to the vanilla-extract team for their work on VE, which macaron uses for evaluating files.

  • Dax Raad Thanks to Dax for helping me with this and thoroughly testing it outß, helping me find numerous bugs and improving macaron.

Issues· 15 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptcsscss-in-jsreactsolid

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架