DEV Community

Alex Spinov
Alex Spinov

Posted on

Panda CSS Has a Free API — Type-Safe CSS-in-JS with Zero Runtime

What if your CSS-in-JS library generated styles at build time — zero runtime JavaScript, full type safety, and atomic CSS output?

Panda CSS is a CSS-in-JS engine that generates atomic CSS at build time.

  • Zero runtime — styles extracted at build, no JS shipped for styling
  • Type-safe — design tokens and utilities fully typed
  • Atomic CSS — generates small, reusable CSS classes
  • Design tokens — define once, use everywhere with autocomplete
  • Recipe system — multi-variant components with type safety
  • Framework-agnostic — React, Solid, Vue, Svelte
import { css } from "../styled-system/css";

function Button() {
  return (
    <button className={css({
      bg: "blue.500",
      color: "white",
      px: "4",
      py: "2",
      rounded: "md",
      _hover: { bg: "blue.600" },
    })}>
      Click me
    </button>
  );
}
Enter fullscreen mode Exit fullscreen mode

A team replaced styled-components (28KB runtime) with Panda CSS. CSS bundle dropped 60%, JavaScript bundle dropped 28KB, and they got autocomplete for all design tokens.

Visit panda-css.com — open source, MIT licensed.


Need custom data pipelines or scraping solutions? Check out my Apify actors or email me at spinov001@gmail.com for custom solutions.

Top comments (0)