Text

The prose primitive — size, weight, color and rhythm as typed tokens, all responsive.

Typography that stays on scale

Text is the prose primitive — size, weight, color and spacing come from the token scale, and every prop takes a responsive map.

Last updated three minutes ago

Import#

import { Text } from "astralis-ui";

Sizes#

Thirteen steps from xs to 9xl; the first eight cover almost all prose.

The quick brown fox (xs)

The quick brown fox (sm)

The quick brown fox (md)

The quick brown fox (lg)

The quick brown fox (xl)

The quick brown fox (2xl)

The quick brown fox (3xl)

The quick brown fox (4xl)

Weights#

Weight light

Weight normal

Weight medium

Weight semibold

Weight bold

Weight extrabold

Truncation#

truncate for one-line ellipsis, lineClamp for multi-line — no CSS needed on your side.

truncate — one line, ellipsis

Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. You may think it's a long way down the road to the chemist's, but that's just peanuts to space.

lineClamp="3"

Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. You may think it's a long way down the road to the chemist's, but that's just peanuts to space.

Styling#

Casing, tracking, decoration, family and the status colors compose freely.

Overline label

Underlined for emphasis

Crossed off the list

fontFamily="mono" without reaching for Code

Status colors come from the same token map

Responsive#

Every prop on this page accepts a breakpoint map:

<Text size={{ base: "sm", md: "md", lg: "lg" }} align={{ base: "center", md: "left" }}>
  Scales with the viewport
</Text>

Props#

Text renders a p by default and forwards all standard HTML props.

PropTypeDefaultDescription
size"xs" – "9xl" (type scale)"md"Font size token.
weight"thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "bold" | "extrabold" | "black"Font weight token.
color"base" | "muted" | "subtle" | "inverted" | status tokens | palette shades"base"Text color from semantic roles or raw palette shades.
align"left" | "center" | "right" | "justify"Text alignment.
casing"uppercase" | "lowercase" | "capitalize" | "normal"Text transform.
lineHeight"none" | "tight" | "snug" | "normal" | "relaxed" | "loose"Leading token.
letterSpacing"tighter" | "tight" | "normal" | "wide" | "wider" | "widest"Tracking token.
fontFamily"heading" | "body" | "sans" | "serif" | "mono"Font family token.
fontStyle · textDecoration"italic" · "underline" | "line-through" | "overline" | "none"Style and decoration.
truncatebooleanfalseSingle-line ellipsis overflow.
lineClamp"1" – "6"Multi-line clamp with ellipsis (ignored when truncate is set).
gutterBottom · paragraphbooleanfalseRhythm helpers — small / paragraph-sized bottom margin (paragraph also forces a <p>).
asElementType"p"Rendered element — span, label, figcaption, …