Typography
A semantic type scale built on Inter Display. Every variant locks in size, weight, letter spacing, and line height - no decisions needed at the call site.
Installation
This brings the typeface too. Four weights of Inter Display - 400, 500, 600, 700 - land in fonts/, with the @font-face rules in components/stepwise/fonts.css and Inter's OFL licence alongside them. The scale is drawn against this family - its -0.03em tracking assumes Inter Display's tight default spacing.
The font
Two lines wire it up. Import the face rules, then point Tailwind's sans stack at the family:
Using a different typeface instead: skip both lines and delete fonts/. Nothing in the library hard-codes a family - every component inherits whatever your page sets, so your own type flows through the same scale untouched. Only the tracking is tuned for Inter Display; on a wider face, relax it:
Import
Type scale
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by default
Consistent by defaultUsage
Headings
Consistent by default
Ship faster, look better
Every detail matters
Soft weight
Every heading has a -soft counterpart at medium (500) weight instead of semibold (600). Same size, lighter feel.
SemiBold - default weight
Medium - reduced weight
Body text
body
Stepwise UI gives you a consistent type scale with zero decisions at the call site.
body-soft
Stepwise UI gives you a consistent type scale with zero decisions at the call site.
detail
Supporting copy, descriptions, and secondary information in your UI.
Labels
Monospace
Uses Geist Mono. Renders as <code> by default.
const stepwise = () => "consistent"The as prop
Separates visual style from semantic HTML. Use it to keep your heading hierarchy correct for SEO and screen readers without sacrificing design - a common need when one section visually calls for an h1 but structurally should be an h2.
Visual h1, semantic h2
CSS classes
The exact Tailwind classes applied per variant. Use them directly when you need the style without the component.
herotext-[36px] md:text-[48px] lg:text-[64px] font-semibold tracking-[-0.03em] leading-none text-balanceheadlinetext-[28px] md:text-[38px] lg:text-[48px] font-semibold tracking-[-0.03em] leading-none text-balanceh1text-[26px] md:text-[30px] lg:text-[36px] font-semibold tracking-[-0.03em] leading-tight text-balanceh1-softtext-[26px] md:text-[30px] lg:text-[36px] font-medium tracking-[-0.03em] leading-tight text-balanceh2text-[22px] md:text-[26px] lg:text-[30px] font-semibold tracking-[-0.03em] leading-tight text-balanceh2-softtext-[22px] md:text-[26px] lg:text-[30px] font-medium tracking-[-0.03em] leading-tight text-balanceh3text-[20px] md:text-[22px] lg:text-[24px] font-semibold tracking-[-0.03em] leading-snug text-balanceh3-softtext-[20px] md:text-[22px] lg:text-[24px] font-medium tracking-[-0.03em] leading-snug text-balanceh4text-[18px] md:text-[20px] font-semibold tracking-[-0.03em] leading-snug text-balanceh4-softtext-[18px] md:text-[20px] font-medium tracking-[-0.03em] leading-snug text-balanceh5text-[16px] md:text-[18px] font-semibold tracking-[-0.03em] leading-snug text-balanceh5-softtext-[16px] md:text-[18px] font-medium tracking-[-0.03em] leading-snug text-balanceh6text-[15px] md:text-[16px] font-semibold tracking-[-0.03em] leading-normal text-balanceh6-softtext-[15px] md:text-[16px] font-medium tracking-[-0.03em] leading-normal text-balancebodytext-[16px] font-semibold tracking-[-0.02em] leading-relaxed text-prettybody-softtext-[16px] font-normal tracking-[-0.02em] leading-relaxed text-prettydetailtext-[14px] font-normal tracking-normal leading-relaxed text-prettycaptiontext-[13px] font-medium tracking-normal leading-normal text-prettycaption-softtext-[13px] font-normal tracking-normal leading-normal text-prettymonotext-[14px] font-normal tracking-normal leading-relaxed [font-family:var(--font-geist-mono,monospace)]Default elements
The HTML element each variant renders when no as prop is provided.
hero<h1>headline<h1>h1<h1>h1-soft<h1>h2<h2>h2-soft<h2>h3<h3>h3-soft<h3>h4<h4>h4-soft<h4>h5<h5>h5-soft<h5>h6<h6>h6-soft<h6>body<p>body-soft<p>detail<p>caption<span>caption-soft<span>mono<code>API reference
TypographyVariant
Props
variantTypographyVariant"body"NoVisual style to apply. Maps to size, weight, tracking, and line height.
asElementTypeper variantNoHTML element to render. Overrides the default without changing the visual style - essential for correct heading hierarchy and semantic markup.
childrenReactNode-NoContent to render inside the element.
classNamestring-NoAdditional Tailwind classes merged via cn(). Applied after variant classes - use to override color, margin, or width.
...restHTMLAttributes-NoAny valid HTML attribute for the rendered element (id, onClick, data-*, aria-*, etc.).