Typography

Foundational text components for titles, paragraphs, inline text, and links with rich formatting options.

When to Use

  • To render headings at different levels (h1-h5)
  • For inline text with semantic variants (success, warning, danger)
  • To display copyable or editable text
  • For text with decorations like code, keyboard, mark, underline, or strikethrough
  • To truncate long text with ellipsis and expand capability

Import

import { Typography } from "orizon";

const { Title, Text, Paragraph, Link } = Typography;

Examples

Title Levels

Title supports five heading levels corresponding to h1-h5.

h1. Orizon Design

h2. Orizon Design

h3. Orizon Design

h4. Orizon Design

h5. Orizon Design
<Typography.Title level={1}>h1. Orizon Design</Typography.Title>
<Typography.Title level={2}>h2. Orizon Design</Typography.Title>
<Typography.Title level={3}>h3. Orizon Design</Typography.Title>
<Typography.Title level={4}>h4. Orizon Design</Typography.Title>
<Typography.Title level={5}>h5. Orizon Design</Typography.Title>

Text Variants

Text comes in semantic color variants for different contexts.

Default textSecondary textSuccess textWarning textDanger textDisabled text
<Typography.Text>Default text</Typography.Text>
<Typography.Text type="secondary">Secondary text</Typography.Text>
<Typography.Text type="success">Success text</Typography.Text>
<Typography.Text type="warning">Warning text</Typography.Text>
<Typography.Text type="danger">Danger text</Typography.Text>
<Typography.Text disabled>Disabled text</Typography.Text>

Text Decorations

Apply inline formatting to emphasize or annotate text.

HighlightedCode snippetCtrl + SUnderlinedStrikethroughBold textItalic text
<Typography.Text mark>Highlighted</Typography.Text>
<Typography.Text code>Code snippet</Typography.Text>
<Typography.Text keyboard>Ctrl + S</Typography.Text>
<Typography.Text underline>Underlined</Typography.Text>
<Typography.Text delete>Strikethrough</Typography.Text>
<Typography.Text strong>Bold text</Typography.Text>
<Typography.Text italic>Italic text</Typography.Text>

Copyable Paragraph

Enable copy-to-clipboard functionality on text content.

Click the copy icon to copy this text to clipboard.

This copies a custom string instead.

<Typography.Paragraph copyable>
  Click the copy icon to copy this text to clipboard.
</Typography.Paragraph>

<Typography.Paragraph copyable={{ text: "Custom copied text" }}>
  This copies a custom string instead.
</Typography.Paragraph>

Editable Text

Allow users to edit text inline.

Click the edit icon to modify this text.

<Typography.Paragraph editable>
  Click the edit icon to modify this text.
</Typography.Paragraph>

Render styled anchor links with optional external behavior.

<Typography.Link href="https://example.com" target="_blank">
  External Link
</Typography.Link>
<Typography.Link href="/docs">Internal Link</Typography.Link>

Ellipsis

Truncate long text with configurable row limits and expand toggle.

This is a very long text that will be truncated to a single line with an ellipsis at the end when it overflows the container width.

This longer text will show two lines before being truncated. Users can click the expand toggle to reveal the full content. It supports multi-line ellipsis with a configurable number of rows.

<Typography.Paragraph ellipsis>
  This is a very long text that will be truncated to a single line
  with an ellipsis at the end when it overflows.
</Typography.Paragraph>

<Typography.Paragraph ellipsis={{ rows: 2, expandable: true }}>
  This longer text will show two lines before being truncated.
  Users can click the expand toggle to reveal the full content.
  It supports multi-line ellipsis with a configurable number of rows.
</Typography.Paragraph>

API

Typography.Title

  • level1 | 2 | 3 | 4 | 5 — Heading level h1-h5 (default: 1)
  • type"secondary" | "success" | "warning" | "danger" — Color variant
  • disabledboolean — Muted, non-interactive styling (default: false)
  • markboolean — Highlight background (default: false)
  • codeboolean — Inline code styling (default: false)
  • underlineboolean — Underline decoration (default: false)
  • deleteboolean — Strikethrough decoration (default: false)
  • strongboolean — Bold weight (default: false)
  • italicboolean — Italic style (default: false)
  • copyableboolean | CopyableConfig — Enable copy functionality (default: false)
  • editableboolean | EditableConfig — Enable inline editing (default: false)

Typography.Text

  • type"secondary" | "success" | "warning" | "danger" — Color variant
  • disabledboolean — Muted styling (default: false)
  • markboolean — Highlight background (default: false)
  • codeboolean — Inline code styling (default: false)
  • keyboardboolean — Keyboard key styling (default: false)
  • underlineboolean — Underline decoration (default: false)
  • deleteboolean — Strikethrough (default: false)
  • strongboolean — Bold weight (default: false)
  • italicboolean — Italic style (default: false)
  • ellipsisboolean | EllipsisConfig — Truncate with ellipsis (default: false)
  • copyableboolean | CopyableConfig — Enable copy (default: false)
  • editableboolean | EditableConfig — Enable editing (default: false)

Typography.Paragraph

Same props as Typography.Text, rendered as a block element.

  • hrefstring — Link URL
  • targetstring — Link target (_blank, etc.)
  • type"secondary" | "success" | "warning" | "danger" — Color variant
  • All text decoration props from Typography.Text

CopyableConfig

  • textstring — Custom text to copy (overrides children)
  • onCopy() => void — Callback after copy
  • tooltips[string, string] — Tooltip text before and after copy (default: ["Copy", "Copied!"])

EllipsisConfig

  • rowsnumber — Number of visible rows (default: 1)
  • expandableboolean — Show expand/collapse toggle (default: false)
  • symbolReactNode — Custom ellipsis symbol