Swirski UI

Typography

Typography

Heading and body text primitives with semantic controls, reusable scales and Swirski tone presets.

Component

12

Request Changes

Import

import { Text, Title } from "@swirski/ui";

Playground

This component does not have editable controls yet.

Usage

<Title order={1} size="display">Build expressive interfaces.</Title>
<Text size="xl" tone="muted" weight="bold">
  A small UI library for expressive, editorial web interfaces.
</Text>

Props

15 generated
PropTypeDefaultNotes
Text.asElementType-Custom text element or component.
Text.asChildbooleanfalseRenders the child as the root element.
Text.childrenReactNode-Text content.
Text.component'div' | 'p' | 'span'"p"Chooses the rendered text element.
Text.size'sm' | 'md' | 'lg' | 'xl' | 'xs' | '2xl'"md"Applies the standard text scale.
Text.tone'default' | 'muted' | 'inverted' | 'subtle'"default"Applies the standard text color treatment.
Text.variant'default' | 'caption' | 'lead'"default"Applies the standard text role treatment.
Text.weight'black' | 'regular' | 'medium' | 'bold'"regular"Applies the text weight.
Title.asElementType-Custom heading element or component.
Title.asChildbooleanfalseRenders the child as the root element.
Title.childrenReactNode-Heading content.
Title.order1 | 2 | 3 | 4 | 5 | 61Chooses the semantic heading element.
Title.size'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'display'-Overrides the visual heading scale.
Title.tone'default' | 'muted' | 'inverted'"default"Applies the standard title color treatment.
Title.variant'default' | 'plain'"default"Generated from TitleProps.
Previous: SectionLabelNext: SwirskiProvider