Skip to main content

Semantic HTML in.
Finished UI out.

One stylesheet for the HTML you already write. Standard elements gain a tested, themeable visual baseline without a distributed JavaScript runtime, whatever renders them.

Get started Examples

Install from npm

npm install @cirthcss/cirth
<article>
  <h2>Sign in</h2>
  <form>
    <label>
      Email
      <input type="email" required>
    </label>
    <label>
      Password
      <input type="password" required>
    </label>
    <label>
      <input type="checkbox" checked>
      Remember me
    </label>
    <button>Sign in</button>
  </form>
</article>

Sign in

The markup on the left is the whole source of the card in front of it. No class, no script.

One stylesheet. Three facts.

Cirth ships compiled CSS with no JavaScript runtime. Its default build is measured in CI, and its accessibility baseline is audited and documented.

JavaScript runtime
0 B

No runtime, initialization or client-side bundle.

Nothing to run
Default CSS, gzipped
17.0 KB

Generated and measured on every build.

See the size budget
Accessibility baseline
WCAG 2.2 AA

Audited rules, tested states and documented limits.

See the accessibility audit

Built on HTML, not around it.

You write the element, the browser gives it its behaviour, and Cirth gives it its look. Nothing is replaced on the way.

Write the element

<time>, <dl>, <meter>, <fieldset>, <button>: each one says what it is, so nothing else has to. No class, no wrapper, no script.


<article>
  <hgroup>
    <h3>Lisbon to Porto</h3>
    <p>Alfa Pendular, <time datetime="2026-11-12T08:39">12 Nov, 08:39</time></p>
  </hgroup>
  <dl>
    <dt>Coach and seat</dt>
    <dd>5, seat 42 (window)</dd>
    <dt>Arrives</dt>
    <dd><time datetime="2026-11-12T11:28">11:28</time>, Porto Campanhã</dd>
  </dl>
  <label>
    Coach 5 is 70% full
    <meter value="0.7" low="0.5" high="0.8" optimum="0">70%</meter>
  </label>
  <fieldset>
    <legend>Platform alerts</legend>
    <label><input type="radio" name="alert" checked> Email</label>
    <label><input type="radio" name="alert"> Text message</label>
  </fieldset>
  <button type="button">Show ticket</button>
</article>
The markup, as you write it

The browser brings the behaviour

It reads the times, pairs each term with its value, colours the gauge by its own good and bad ranges, keeps one alert chosen at a time and moves the choice with the arrow keys. Unstyled, it already works.

The same markup in the browser, with no stylesheet

Cirth draws it

One stylesheet adds type, spacing, colour, focus and every state, in light and in dark. The markup has not changed. Pick the other alert.

Lisbon to Porto

Alfa Pendular,

Coach and seat
5, seat 42 (window)
Arrives
, Porto Campanhã
Platform alerts
The same markup, with Cirth

Less markup to maintain.

The sign-in card at the top of this page, written twice to one brief: the same 10 elements, both colour schemes, a focus ring on every control, hover, pressed and invalid states. Written for Cirth, it carries no class at all.

Counted
Every class name in the markup, and its bytes in UTF-8 with the whitespace collapsed.
Not counted
Either stylesheet, and any build step.
Measured
, on Cirth 0.16.0

Both versions, method and limitations

Class names in the markup

Semantic HTML + Cirth
0
Utility-first implementation
77
100% fewer class names

HTML, minified

Semantic HTML + Cirth
239 B
Utility-first implementation
1,395 B
83% less HTML

Your theme. Same HTML.

Every colour, radius and surface is a --cirth-* custom property. The card starts as Cirth ships; three of them then change, one at a time, and its markup never does. Its controls are live: hover, focus and pick, and every state follows the theme.

  1. The accent --cirth-primary
  2. The corners --cirth-border-radius
  3. The canvas --cirth-canvas
:root {
  --cirth-primary: light-dark(oklch(50% 0.17 32), oklch(72% 0.13 40));
  --cirth-border-radius: 1.125rem;
  --cirth-canvas: light-dark(oklch(95% 0.026 85), oklch(20% 0.02 60));
}
The same card throughout, in its own copy of Cirth, so this page's theme and preset do not reach it.

Pick a preset. Both schemes are ready.

Start with Default, Material, Metro or Plain. Default is Cirth as it ships, and each of the others is a small token layer loaded after it. Every component reads the same tokens and every preset has coordinated light and dark schemes, so you can set a consistent visual direction quickly and switch modes without changing your HTML.

Same markup. Same components. Two coordinated schemes.

@import "@cirthcss/cirth"; @import "@cirthcss/cirth";
@import "@cirthcss/cirth/presets/material";
@import "@cirthcss/cirth";
@import "@cirthcss/cirth/presets/metro";
@import "@cirthcss/cirth";
@import "@cirthcss/cirth/presets/plain";

Compare every preset

The same form twice, cut by a divider: the preset in its light scheme on the left, in its dark scheme on the right. Each half is its own copy of Cirth, so the theme and preset this page uses do not reach it.

Framework agnostic. Works everywhere.

Cirth styles HTML, so it does not mind what wrote it: a JavaScript framework, a server template, a CMS, a static site generator or a desktop app.

Each guide shows where the one import goes in that stack, and the one setting that keeps a build from rewriting Cirth's colours.

Browse all 53 guides

Pure CSS

Your HTML is already enough.

Add Cirth once and keep the elements, behaviour and stack you already use. No component runtime and no client-side bundle to initialize.

Install from npm

npm install @cirthcss/cirth

Get started Browse examples

Search documentation

Type at least two characters to search.