🍣 surimi

Modern CSS just
got
even better!

Surimi is the next generation of CSS tooling. Think traditional CSS preprocessors, but with the power of Typescript and Rust built in.

Not another preprocessor

CSS preprocessors like SCSS are great, but as CSS is getting more and more modern, they solve less and less problems. Today, CSS's biggest problems are Developer experience, type-safety, composability, extensibility, complex selectors etc. and Surimi solves all of them.

Type-safe CSS

No more wrong variable names, missing units etc. Surimi is pure typescript, so you see all errors in your editor (and the console).

Perfect DX

Get autocomplete, type hints, inline docs, compatibility notes, spec information and more. right in your editor as you type.

No language barrier

Built-in support for mixins, composition and more. And it's TypeScript! So use loops, functions, objects, nesting - all of it, fully typed.

Zero learning curve

If you already know CSS and TypeScript, you know Surimi. And if not, Surimi show's you all your options. Just one hover away.

See It In Action

CSS is nice and powerful, but lacking things we're used to in coding, like re-usable selectors, compile-time and type safety, a direct JS interface, composability etc.
Typescript already solves all of this - and Surimi takes advantage of that.

Some examples of Surimi code
const button = select('.my-button')
const input = select('input')

button.style({
  backgroundColor: primary,
})

// Everything can be re-used.
button.hover().use(interactiveIcon, focusable, transitions.fast)

// Everything is chainable and type-safe.
button.active().not().disabled().style({
  scale: 1.2,
})

// Incredible API. Yes, this works with ZERO runtime.
when(button).not.disabled().and.hovered().select('header').style({
  scale: 1.2,
})
Pro Tip: With Surimi, you get full TypeScript type checking, autocomplete for property names and values, and instant feedback on typos or invalid CSS. If you change a selector (like .container), all related styles update automatically.
Ready to get started?

Install Surimi Today

Get up and running in seconds with your favorite package manager

$ npm install surimi
$ yarn add surimi
$ pnpm add surimi

Quick Start

  1. 1 Install Surimi using one of the commands above
  2. 2 Import our vite plugin (works with React, Astro, Vue and more) and use it in your vite config
  3. 3 Create a `.css.ts` file and start using Surimi!
  4. 4 Import the .css.ts file into any other file of your app... done! 🎉
Read the documentation →