Heading

Semantic heading component with named textStyle recipes — one prop sets a complete, on-brand type style.

Page Title

Section Title

Subsection

<VStack gap={2}>  <Heading textStyle="h1">Page Title</Heading>  <Heading textStyle="h2">Section Title</Heading>  <Heading textStyle="h3">Subsection</Heading></VStack>

Usage

import { Heading } from "@reva/ui";

Heading renders an <h4> by default. The textStyle prop applies a complete, named type style in one step — keeping titles consistent without hand-tuning size, weight, tracking, and leading individually. The hero1hero4 recipes are a distinct sub-family in the serif brand font for marketing and editorial hero surfaces.

When textStyle is omitted, the recipe is derived from the as heading level, so <Heading as="h1"> still looks like an h1; a bare <Heading> is an h4. The as prop also accepts common semantic text elements (p, span, div, strong, em, small, mark, label, figcaption, blockquote, legend) for cases where Heading's display typography is wanted without a heading landmark — pair it with textStyle to keep the look while changing the tag, e.g. <Heading textStyle="h1" as="p"> for a stat value.

The granular size, weight, tracking, and leading props override individual facets of the recipe.

Examples

Text styles

Each textStyle is a ready-made heading style — pick a level and its size, weight, tracking, and leading come as a set.

The personal CFO for business owners

Build wealth that grows, with you

Make smarter calls, with less effort

Forecast your future

Connect your accounts
Keep you on track
<VStack gap={3}>  <Heading textStyle="h1">The personal CFO for business owners</Heading>  <Heading textStyle="h2">Build wealth that grows, with you</Heading>  <Heading textStyle="h3">Make smarter calls, with less effort</Heading>  <Heading textStyle="h4">Forecast your future</Heading>  <Heading textStyle="h5">Connect your accounts</Heading>  <Heading textStyle="h6">Keep you on track</Heading></VStack>

Hero

Hero recipes switch to the serif brand font, bold by default, with tight leading and tracking, a deliberately editorial register, distinct from the common product headings. Reserve them for marketing and hero surfaces; they read oversized on dense product pages. A bare hero renders an <h1> landmark; override with as (e.g. as="p" for a decorative display line). Re-weight with the weight prop just like any other recipe.

Your personal CFO

Your personal CFO

Your personal CFO

Your personal CFO

<VStack gap={4}>  <Heading textStyle="hero1">Your personal CFO</Heading>  <Heading textStyle="hero2">Your personal CFO</Heading>  <Heading textStyle="hero3">Your personal CFO</Heading>  <Heading textStyle="hero4">Your personal CFO</Heading></VStack>

Weights

Re-weight any recipe with the weight prop without changing its size, tracking, or leading.

Normal

Medium

Semibold

Bold

<VStack gap={2}>  <Heading weight="normal">Normal</Heading>  <Heading weight="medium">Medium</Heading>  <Heading weight="semibold">Semibold</Heading>  <Heading weight="bold">Bold</Heading></VStack>

Overriding size

Use the size prop to override the recipe's size while keeping its other facets. The override always wins (textStyle="h1" + size="lg" renders at lg).

h3 recipe at 5xl

h1 recipe at lg

<VStack gap={2}>  <Heading textStyle="h3" size="5xl">h3 recipe at 5xl</Heading>  <Heading textStyle="h1" size="lg">h1 recipe at lg</Heading></VStack>

Non-heading element

Render Heading's display typography on a non-heading tag when you need the look of a heading without the landmark semantics — for example, a large stat value paired with a label.

AUM

£51.54m

<VStack gap={1} align="start">  <Text textStyle="caption1" color="muted-foreground">AUM</Text>  <Heading textStyle="h1" as="p">£51.54m</Heading></VStack>

Props

PropTypeDefaultDescription
textStyle"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "hero1" | "hero2" | "hero3" | "hero4""h4"Named type style bundling family, size, weight, tracking, and leading. hero1hero4 use the serif brand font.
as"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div" | "strong" | "em" | "small" | "mark" | "label" | "figcaption" | "blockquote" | "legend"from textStyleRendered element. When omitted, derives from textStyle (or the matching heading level). Non-heading tags render the typography without a landmark.
size"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl"recipeOverrides the recipe font size.
weight"normal" | "medium" | "semibold" | "bold"recipeOverrides the recipe font weight.
tracking"tighter" | "tight" | "normal" | "wide"recipeOverrides the recipe letter spacing.
leading"none" | "tight" | "snug" | "normal" | "relaxed" | "loose"recipeOverrides the recipe line height.
asChildbooleanfalseMerge props onto the child element.
classNamestringAdditional Tailwind / utility classes.

On this page