Skip to main content

molecules

Utility sample

One documented utility class, with its note, syntax, source file, and a grid of live swatches. The Decoration pages are built from it.

Specimens

Gel

Gel

Translucent colour plates.

gel · gel-<color> · styles/backgrounds/Gel.css

  • gel gel-primary
  • gel gel-accent
{{ UtilitySample.render({
  id: "gel-specimen",
  name: "Gel",
  note: "Translucent colour plates.",
  syntax: "gel · gel-<color>",
  file: "styles/backgrounds/Gel.css",
  examples: ["gel gel-primary", "gel gel-accent"]
}) }}

Params

ParamTypeDescription
idstringSuffix for the heading id (utility-<id>). Unique on the page.
namestringThe heading text.
levelnumberHeading level, 2 to 6. Defaults to 2; use 3 when the sample sits under a page section.
notestringOne paragraph on what the utility does.
syntaxstringThe class forms the utility takes.
filestringThe stylesheet that defines it.
examplesarrayClass lists, one per swatch. Each is applied to a swatch and printed under it.

Fixed design: takes no styling params. It sets its own spacing for the docs
ground, and the swatches draw on neutral-900.