Typography

Tailwind utility recipes for headings, body text, muted text, and numeric values, using the same classnames as the end-customer portal.

Consumption

Electricity usage across your metering points, updated daily.

June

284kWh

12% less than May

Usage

Typography is not a component you import: type is written as Tailwind utilities and spark classnames on semantic HTML elements. Two spark text color classnames ship with the spark-ui styles:

  • text-gray is the primary text color (--neutral-a12).
  • text-gray-light is the secondary, muted text color (--neutral-a11).
function MeterSection() {
  return (
    <section>
      <h3 className="text-base font-bold text-gray">Meter readings</h3>
      <p className="text-sm text-gray-light">Last submitted on 2 July 2026</p>
    </section>
  )
}

These are the same classnames the end-customer portal writes in its blocks, so anything built with them sits visually next to the portal's own blocks. All text-* sizes are multiplied by the theme's [data-scaling] knob, so type follows the portal's zoom setting; a hardcoded pixel size opts out of that.

Pick heading elements for document structure, not for looks: the size comes from the classes, so a visually small heading can still be the correct level.

For a view title with back navigation and actions, use Page Header instead of hand-rolling the h1 row.

Examples

h1

The main title of a page or drawer. One per view.

Contract

h2

Larger group headings: chart headers, month labels.

January 2026

h3

The near-universal block header in the portal.

Meter readings

h4

Sub-grouping inside a block, for example a labelled value cluster.

Grid supply

p

text-sm text-gray is the workhorse body size; use text-base text-gray for primary content rows. Add leading-5 when a row pairs with a value column, and truncate for single-line rows that can overflow.

Your monthly installment covers the estimated consumption of your household. After the annual meter reading, the difference is settled with your next invoice.

blockquote

Quoted or excerpted text, for example a note from support.

Feed-in credit is applied with your next annual invoice. You do not need to submit anything for it.

table

Header cells repeat the h3 recipe; numeric columns are right-aligned with tabular-nums so digits line up.

MonthConsumptionCost
April312 kWh98.40 €
May324 kWh102.10 €
June284 kWh89.60 €

list

Lists inside body copy use marker utilities plus the body text recipe.

  • 100% renewable electricity
  • No base fee for the first year
  • Monthly cancellation

Inline code

Technical identifiers inside a sentence. text-[0.85em] sizes the code relative to the surrounding text instead of a fixed step.

Set data-scaling on the theme root to resize all text.

Lead

The intro line under a page title.

Track your consumption, submit meter readings, and manage your tariff in one place.

Large

Standalone emphasized text, one step above body.

Estimated annual cost: 1,148 €

Small

Helper text and footnotes below inputs, charts, and value rows.

Values are estimated until your next meter reading.

Muted

Secondary lines next to primary content: contact details, timestamps, tooltip labels. Muting is done with text-gray-light, never with opacity-*.

Anna Schmidt

anna.schmidt@example.com

+49 151 2345 6789

Values

Numbers that update or align in columns always get tabular-nums, so digits keep a fixed width. Large metrics render the unit as a separate text-sm font-bold span; value columns are right-aligned with text-right.

1,284kWh

Grid supply

12,480.2 kWh

Feed-in

3,105.7 kWh

Error

Validation and failure messages use text-error; text-error-light is the softer variant for secondary error lines.

Your meter reading could not be submitted. Check the value and try again.

API Reference

The type scale, by element and role.

ElementRoleClasses
h1Page titletext-2xl font-bold
h2Large headingtext-xl font-bold or text-lg font-bold
h3Section headingtext-base font-bold text-gray
h4Sub-headingtext-sm font-bold text-gray
pBodytext-sm text-gray or text-base text-gray
pLeadtext-base text-gray-light
pLargetext-lg font-bold
p / spanMutedtext-sm text-gray-light
small / timeSmalltext-xs text-gray-light
pErrortext-sm text-error
spanLarge metrictext-2xl font-bold tabular-nums
spanValue in a rowtext-base tabular-nums text-right text-gray
blockquoteQuoteborder-l-2 border-gray pl-4 text-sm text-gray-light italic
codeInline coderounded bg-gray-a3 px-1 py-0.5 font-mono text-[0.85em]
ul / olListlist-disc pl-6 / list-decimal pl-6 plus a body recipe

text-gray, text-gray-light, text-error, and border-gray are spark-ui utilities, not Tailwind's built-in palettes. If they have no effect, the app is missing the @epilot/spark-ui/styles import.

Weights in use are font-bold (headings, values), font-semibold, font-medium, and font-normal. Sizes above text-3xl are not part of the scale.

Accessibility

  • Pick heading levels for document structure, not size: one h1 per view, no skipped levels. A visually small heading can still be an h2.
  • Don't put meaning in color alone. A consumption delta in text-success-light also needs the direction in the text ("12% less than May"), and an error message needs wording that says it failed, not just the red.
  • tabular-nums only changes glyph widths; screen readers read the number unchanged.
  • Muted text (text-gray-light, --neutral-a11) keeps sufficient contrast on both light and dark appearances; don't de-emphasize text with opacity-*, which can drop below contrast minimums.

On this page