Skip to content
Get started

Quick start

A 2-minute tour through the BlastCSS conventions — tokens, layout primitives, components, and utilities.

1. Tokens drive everything

All visual decisions live in CSS custom properties prefixed with --b-. Override them anywhere — :root, a wrapper element, or even a single component instance.

css
:root {
  --b-primary-h: 200;     /* shift the hue */
  --b-radius: .375rem;    /* tighter corners */
  --b-control: 2.75rem;   /* taller controls */
}

See theming & tokens for the full list.

2. Layout primitives

Compose pages with semantic layout classes. Each is a single-purpose primitive:

Stack Cluster Split Grid Sidebar
A
B
C

3. Components are HTML + class names

No JSX, no slots, no hydration: a button is <button class="b-btn">. Extend by adding modifier classes (b-btn-secondary, b-btn-soft, b-btn-lg).

4. Utilities for one-offs

Short, opt-in helpers for spacing, layout, typography, and color. They live in a dedicated cascade layer so they never fight components.

JD
Jane Doe jane@blast.css

5. Optional JS for behavior

CSS owns the look. A small (3 KB gzip) helper script wires up native interactivity — <dialog>, popovers, tabs, toasts, command palettes — when CSS alone can't.

html
<button class="b-btn" data-b-toggle="dialog" data-b-target="#welcome">Open</button>

<dialog id="welcome" class="b-modal">
  <div class="b-card-header">
    <strong>Welcome</strong>
    <button class="b-close" data-b-dismiss="dialog" aria-label="Close">×</button>
  </div>
  <div class="b-card-body">It just works.</div>
</dialog>

Continue with theming, or browse components.

Edit this page