Layout

Typography

Semantic text components for headings, body text, paragraphs and links with rich formatting options.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
DefaultSecondarySuccessWarningDanger
ItalicUnderlineStrikethroughinline codeClick to copy

Body text with a typography link styled with the primary color.

Installation

npx benflux-ui add typography

Usage

import { Heading, Text, Paragraph, TypographyLink } from "@benflux-ui/react"

<Heading level={1}>Page Title</Heading>
<Heading level={2} as="h3">Semantic override</Heading>

<Text variant="secondary" size="sm" weight="medium">Label text</Text>
<Text italic underline>Styled text</Text>
<Text code>const x = 1</Text>
<Text copyable>Copy me</Text>

<Paragraph size="lg">
  Body paragraph with a <TypographyLink href="/docs">link</TypographyLink>.
</Paragraph>

Props — Heading

PropTypeDefaultDescription
level1 | 2 | 3 | 4 | 5 | 61Semantic heading level (h1–h6)
as"h1" | "h2" | "h3" | "h4" | "h5" | "h6"Override the rendered HTML element

Props — Text

PropTypeDefaultDescription
variant"default" | "secondary" | "success" | "warning" | "danger""default"Color variant
size"xs" | "sm" | "base" | "lg" | "xl""base"Font size
weight"normal" | "medium" | "semibold" | "bold""normal"Font weight
italicbooleanfalseItalic style
underlinebooleanfalseUnderline decoration
strikethroughbooleanfalseStrikethrough decoration
codebooleanfalseInline code style with monospace font
copyablebooleanfalseShows a copy icon on hover