Corpora UI
Atoms

Text

Typography primitive for body copy, labels and captions.

Readable corpus prose belongs here.

Usage

import { Text } from "@exegia/corpora-ui"
import { TextClickPopover } from "@exegia/corpora-ui"

<Text.Heading size="large">Corpus title</Text.Heading>
<Text.Paragraph>Readable corpus prose belongs here.</Text.Paragraph>
<Text.Root type="link" href="/activity">View activity</Text.Root>

// Click-triggered popover — works for default (span), link and subscript
<TextClickPopover type="subscript" popover={<p>Annotation</p>}>
  Subscript note
</TextClickPopover>

API reference

PropTypeDefaultDescription
type"default" | "heading" | "paragraph" | "link" | "subscript""default"Selects the semantic element and its typography treatment.
size"small" | "medium" | "large" | number"medium"Uses the type scale, or accepts a pixel font size when numeric.
selectionstring | boolean—Adds a reader-selection treatment; a string is exposed as data-selection.

Last updated on

On this page