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
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-grayis the primary text color (--neutral-a12).text-gray-lightis 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.
| Month | Consumption | Cost |
|---|---|---|
| April | 312 kWh | 98.40 € |
| May | 324 kWh | 102.10 € |
| June | 284 kWh | 89.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.
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.
Grid supply
12,480.2 kWhFeed-in
3,105.7 kWhError
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.
| Element | Role | Classes |
|---|---|---|
h1 | Page title | text-2xl font-bold |
h2 | Large heading | text-xl font-bold or text-lg font-bold |
h3 | Section heading | text-base font-bold text-gray |
h4 | Sub-heading | text-sm font-bold text-gray |
p | Body | text-sm text-gray or text-base text-gray |
p | Lead | text-base text-gray-light |
p | Large | text-lg font-bold |
p / span | Muted | text-sm text-gray-light |
small / time | Small | text-xs text-gray-light |
p | Error | text-sm text-error |
span | Large metric | text-2xl font-bold tabular-nums |
span | Value in a row | text-base tabular-nums text-right text-gray |
blockquote | Quote | border-l-2 border-gray pl-4 text-sm text-gray-light italic |
code | Inline code | rounded bg-gray-a3 px-1 py-0.5 font-mono text-[0.85em] |
ul / ol | List | list-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
h1per view, no skipped levels. A visually small heading can still be anh2. - Don't put meaning in color alone. A consumption delta in
text-success-lightalso 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-numsonly 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 withopacity-*, which can drop below contrast minimums.