Skip to main content

Chassis

Chassis CSS

CSS built on your tokens. Every class named as it is in Figma.

Chassis CSS turns Chassis Tokens into custom properties, components, a 12-column grid and utilities. Change a token, and every class follows.

npm install @chassis-ui/css

Currently v0.16.0Changes

What you get

One stylesheet for every brand. The names your designers use.

The values come from your tokens and the names come from the Figma library. Components, layout and utilities are built on both.

Tokens

Style every brand from one stylesheet.

  • Colors, type and spacing come from Chassis Tokens as custom properties.
  • Dark mode and right-to-left layouts are built in.
  • A theme can change at runtime, through custom properties.

Figma

Read the class name off the design.

  • Class and variable names match the names in the Figma library.
  • Components subtract the border from the padding, so sizes match the design.
  • Text sizes scale with the screen, as the tokens define them.

Build

Start with components, finish with utilities.

  • Buttons, cards, dialogs, menus and forms, with typed JavaScript plugins.
  • A 12-column grid with responsive breakpoints and gap utilities.
  • Utilities for spacing, type and color, for what a component does not cover.

How it works

From an install to a themed interface.

Three steps take a project from an empty page to components that follow your brand. A later token change needs no new markup.

Install to ship

  • 01 · Install

    Add the package.

    Install from npm with your token package, and import the whole framework or single components.

  • 02 · Build

    Compose the interface.

    Lay pages out with the grid, and build them from components and utilities.

  • 03 · Theme

    Change the tokens.

    Customize with Sass variables or custom properties. A token change reaches every component.

Works with

CSS sits in the middle. Tokens feed it, React renders it.

Chassis CSS takes its values from your tokens. The Figma library and the React components share its names.

  • Chassis Tokens

    The source of every value in the stylesheet. Without your tokens, the classes carry the default brand.

  • Chassis Figma

    The same components as a Figma library, with the names the classes use.

  • Chassis React

    Accessible React components built on React Aria, styled with these classes.

SCSS
Source and customization
Accessibility
Keyboard, ARIA and focus built in
CSS Variables
Runtime theming
CSS clamp()
Fluid type and spacing

Get started

Start with the guide that matches your task.

Install the framework, learn how it reads your tokens, or go straight to the component you need.

Getting started

  • Quick start

    One HTML file with the framework from a CDN.

  • Installation

    The packages, the import order and the build.

  • Tailwind

    Chassis CSS in a Tailwind CSS v4 project.

Core concepts

Components

  • Button

    Variants, sizes and states.

  • Card

    A container for grouped content.

  • Modal

    Dialogs over the page.