Typography

Multi-line code samples

Use CodeBlock for copy-ready snippets with horizontal scrolling on narrow viewports and aria-labels describing language hints.

pnpm add @zentauri-ui/zentauri-components

Variants showcase

Tone tokens align with dark shells across Zentauri previews—swap surfaces thoughtfully.

default

export const tone = "default";

muted

export const tone = "muted";

primary

export const tone = "primary";

secondary

export const tone = "secondary";

accent

export const tone = "accent";

destructive

export const tone = "destructive";

info

export const tone = "info";

success

export const tone = "success";

warning

export const tone = "warning";

error

export const tone = "error";

gradient-pink-violet

export const tone = "gradient-pink-violet";

gradient-cyan-violet

export const tone = "gradient-cyan-violet";

gradient-cyan-blue

export const tone = "gradient-cyan-blue";

gradient-cyan-green

export const tone = "gradient-cyan-green";

gradient-cyan-orange

export const tone = "gradient-cyan-orange";

gradient-cyan-red

export const tone = "gradient-cyan-red";

gradient-cyan-purple

export const tone = "gradient-cyan-purple";

gradient-cyan-pink

export const tone = "gradient-cyan-pink";

Formatting showcase

Boolean emphasis props layer Tailwind utilities consistently.

{
  "name": "zentauri-ui",
  "private": true
}

Combination examples

Patterns you can paste into marketing pages and dashboards.

import { Text } from "@zentauri-ui/zentauri-components/ui/typography";

export function Demo() {
  return <Text tone="muted">Preview-ready body copy.</Text>;
}

Typography variants examples

Density mirrors other previews: each row pairs live output with the matching import and JSX. Use Show output / Show code on every row; snippets start with Variant naming the token row.


Variant: CODE-BLOCK · TONE · DEFAULT

export const tone = "default";

Variant: CODE-BLOCK · TONE · MUTED

export const tone = "muted";

Variant: CODE-BLOCK · TONE · PRIMARY

export const tone = "primary";

Variant: CODE-BLOCK · TONE · SECONDARY

export const tone = "secondary";

Variant: CODE-BLOCK · TONE · ACCENT

export const tone = "accent";

Variant: CODE-BLOCK · TONE · DESTRUCTIVE

export const tone = "destructive";

Variant: CODE-BLOCK · TONE · INFO

export const tone = "info";

Variant: CODE-BLOCK · TONE · SUCCESS

export const tone = "success";

Variant: CODE-BLOCK · TONE · WARNING

export const tone = "warning";

Variant: CODE-BLOCK · TONE · ERROR

export const tone = "error";

Variant: CODE-BLOCK · TONE · GRADIENT-PINK-VIOLET

export const tone = "gradient-pink-violet";

Variant: CODE-BLOCK · TONE · GRADIENT-CYAN-VIOLET

export const tone = "gradient-cyan-violet";

Variant: CODE-BLOCK · TONE · GRADIENT-CYAN-BLUE

export const tone = "gradient-cyan-blue";

Variant: CODE-BLOCK · TONE · GRADIENT-CYAN-GREEN

export const tone = "gradient-cyan-green";

Variant: CODE-BLOCK · TONE · GRADIENT-CYAN-ORANGE

export const tone = "gradient-cyan-orange";

Variant: CODE-BLOCK · TONE · GRADIENT-CYAN-RED

export const tone = "gradient-cyan-red";

Variant: CODE-BLOCK · TONE · GRADIENT-CYAN-PURPLE

export const tone = "gradient-cyan-purple";

Variant: CODE-BLOCK · TONE · GRADIENT-CYAN-PINK

export const tone = "gradient-cyan-pink";

Variant: CODE-BLOCK · LANGUAGE · BASH

pnpm add @zentauri-ui/zentauri-components

Variant: CODE-BLOCK · LANGUAGE · TSX

import { Text } from "@zentauri-ui/zentauri-components/ui/typography";

export function Demo() {
  return <Text tone="muted">Ready.</Text>;
}

Typography API

Generated from the package prop types and variant definitions.

Blockquote

BlockquoteProps

Variants

PropTypeDefault
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default

Behavior

PropTypeDefault
attributionAttribution label; distinct from the native cite URL attribute.string | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLQuoteElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLQuoteElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

CodeBlock

CodeBlockProps

Variants

PropTypeDefault
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default

Behavior

PropTypeDefault
languagestring | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLPreElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLPreElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

DescriptionList

DescriptionListProps

Variants

PropTypeDefault
layout
inlineresponsivestacked
responsive
separators
falsetrue
false
size
baselgsm
base
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDListElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLDListElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

DescriptionListDetails

DescriptionListDetailsProps

Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

DescriptionListItem

DescriptionListItemProps

Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLDivElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

DescriptionListTerm

DescriptionListTermProps

Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

Emphasis

EmphasisProps

Variants

PropTypeDefault
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

ExpandableText

ExpandableTextProps

Behavior

PropTypeDefault
buttonClassNamestring | undefinednone
contentClassNamestring | undefinednone
contentIdstring | undefinednone
defaultExpandedboolean | undefinednone
expandedboolean | undefinednone
lessLabelstring | undefinednone
linesnumber | undefinednone
moreLabelstring | undefinednone
onExpandedChange((expanded: boolean) => void) | undefinednone
showToggleAlways exposes the control when layout measurement is unavailable.'overflow' | 'always' | undefinednone
text*stringnone
Inherited HTML props
PropTypeDefault
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLDivElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

FootnoteBacklink

FootnoteBacklinkProps

Behavior

PropTypeDefault
label*stringnone
noteId*stringnone
referenceId*stringnone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
downloadanynone
idstring | undefinednone
onClickMouseEventHandler<HTMLAnchorElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLAnchorElement> | undefinednone
referrerPolicyHTMLAttributeReferrerPolicy | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
targetHTMLAttributeAnchorTarget | undefinednone
titlestring | undefinednone

FootnoteItem

FootnoteItemProps

Behavior

PropTypeDefault
noteId*stringnone
number*numbernone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
onClickMouseEventHandler<HTMLLIElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLLIElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

FootnoteReference

FootnoteReferenceProps

Behavior

PropTypeDefault
noteId*stringnone
number*numbernone
referenceId*stringnone
Inherited HTML props
PropTypeDefault
classNamestring | undefinednone
downloadanynone
onClickMouseEventHandler<HTMLAnchorElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLAnchorElement> | undefinednone
referrerPolicyHTMLAttributeReferrerPolicy | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
targetHTMLAttributeAnchorTarget | undefinednone
titlestring | undefinednone

Footnotes

FootnotesProps

Behavior

PropTypeDefault
scopeIdstring | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLDivElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

FootnotesList

FootnotesListProps

Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLOListElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLOListElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

Heading

HeadingProps

Variants

PropTypeDefault
align
centerendjustifystart
none
leading
normalrelaxedtight
none
level*
123456
none
measure
nonereadablewide
none
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
tracking
normaltightwide
none
weight
boldmediumnormalsemibold
none
wrap
balancenormalnowrappretty
none

Behavior

PropTypeDefault
boldExplicit weight takes precedence over bold.boolean | undefinednone
displayLevelVisual scale; defaults to level. Does not change the semantic heading tag.HeadingLevel | undefinednone
displaySizeMarketing display size. Takes precedence over displayLevel.NonNullable<'md' | 'sm' | 'lg' | null | undefined> | undefinednone
italicboolean | undefinednone
scaleFluid sizing is opt-in; default retains the existing responsive scale.'default' | 'fluid' | undefinednone
strikethroughboolean | undefinednone
underlineboolean | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLHeadingElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLHeadingElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

HighlightText

HighlightTextProps

Behavior

PropTypeDefault
caseSensitiveUnicode simple case folding, without locale or accent normalization.boolean | undefinednone
markClassNamestring | undefinednone
query*string | readonly string[]none
text*stringnone
Inherited HTML props
PropTypeDefault
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLSpanElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLSpanElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

InlineCode

InlineCodeProps

Variants

PropTypeDefault
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

List

ListProps

Variants

PropTypeDefault
marker
circlediscnone
disc
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default

Behavior

PropTypeDefault
orderedboolean | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLOListElement> | MouseEventHandler<HTMLUListElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).((instance: HTMLUListElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLUListElement | null> | ((instance: HTMLOListElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLOListElement | null> | null | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

ListItem

ListItemProps

Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLLIElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLLIElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

Mark

MarkProps

Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

NumberText

NumberTextProps

Variants

PropTypeDefault
align
centerendjustifystart
none
font
bodymono
none
leading
normalrelaxedtight
none
measure
nonereadablewide
none
numeric
normaltabular
tabular
size
baselgsmxlxs
base
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
tracking
normaltightwide
none
weight
boldmediumnormalsemibold
none
wrap
balancenormalnowrappretty
none

State

PropTypeDefault
value*number | bigintnone

Behavior

PropTypeDefault
as'div' | 'p' | 'span' | undefinednone
formatOptionsIntl's style is separate from the native React CSS style prop.Intl.NumberFormatOptions | undefinednone
localestring | string[] | undefinednone
partClassNamesStyles native parts without replacing their text or order.Partial<Record<keyof Intl.NumberFormatPartTypeRegistry, string>> | undefinednone
Inherited HTML props
PropTypeDefault
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | MouseEventHandler<HTMLSpanElement> | MouseEventHandler<HTMLParagraphElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).((instance: HTMLDivElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement | null> | ((instance: HTMLSpanElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLSpanElement | null> | ((instance: HTMLParagraphElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLParagraphElement | null> | null | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

Prose

ProseProps

Variants

PropTypeDefault
measure
nonereadablewide
readable
size
baselgsm
base
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default

Behavior

PropTypeDefault
as'div' | 'article' | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | MouseEventHandler<HTMLElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).((instance: HTMLDivElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLElement | null> | null | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

Small

SmallProps

Variants

PropTypeDefault
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

Strong

StrongProps

Variants

PropTypeDefault
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLElement> | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

Text

TextProps

Variants

PropTypeDefault
align
centerendjustifystart
none
font
bodymono
none
leading
normalrelaxedtight
none
measure
nonereadablewide
none
numeric
normaltabular
none
preset
bodycaptionleadoverline
body
size
baselgsmxlxs
base
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
tracking
normaltightwide
none
underline
alwayshovernone
always
weight
boldmediumnormalsemibold
none
wrap
balancenormalnowrappretty
none

Behavior

PropTypeDefault
as'div' | 'label' | 'p' | 'span' | undefinednone
boldExplicit weight, then a preset's weight, take precedence over bold.boolean | undefinednone
highlightVisual highlighting only; use semantic emphasis for importance.boolean | undefinednone
italicboolean | undefinednone
strikethroughboolean | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | MouseEventHandler<HTMLSpanElement> | MouseEventHandler<HTMLParagraphElement> | MouseEventHandler<HTMLLabelElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).((instance: HTMLDivElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement | null> | ((instance: HTMLSpanElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLSpanElement | null> | ((instance: HTMLParagraphElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLParagraphElement | null> | ((instance: HTMLLabelElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLLabelElement | null> | null | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

TextLink

TextLinkProps

Variants

PropTypeDefault
align
centerendjustifystart
none
leading
normalrelaxedtight
none
measure
nonereadablewide
none
size
baselgsmxlxs
base
tone
accentdefaultdestructiveerrorgradient-cyan-bluegradient-cyan-greengradient-cyan-orangegradient-cyan-pinkgradient-cyan-purplegradient-cyan-redgradient-cyan-violetgradient-pink-violet+6
default
tracking
normaltightwide
none
underline
alwayshovernone
always
weight
boldmediumnormalsemibold
none
wrap
balancenormalnowrappretty
none

Behavior

PropTypeDefault
externalIndicatorDecorative external-link marker; does not change target or accessible name.boolean | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
downloadanynone
hrefstring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLAnchorElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).Ref<HTMLAnchorElement> | undefinednone
referrerPolicyHTMLAttributeReferrerPolicy | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
targetHTMLAttributeAnchorTarget | undefinednone
titlestring | undefinednone

TruncateText

TruncateTextProps

Behavior

PropTypeDefault
as'div' | 'p' | 'span' | undefinednone
linesnumber | undefinednone

Content

PropTypeDefault
children*stringnone
Inherited HTML props
PropTypeDefault
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | MouseEventHandler<HTMLSpanElement> | MouseEventHandler<HTMLParagraphElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).((instance: HTMLDivElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement | null> | ((instance: HTMLSpanElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLSpanElement | null> | ((instance: HTMLParagraphElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLParagraphElement | null> | null | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

VisuallyHidden

VisuallyHiddenProps

Behavior

PropTypeDefault
as'div' | 'span' | undefinednone
focusableReveal on focus-within, for example when containing a skip-link anchor.boolean | undefinednone
Inherited HTML props
PropTypeDefault
childrenReactNodenone
classNamestring | undefinednone
idstring | undefinednone
onClickMouseEventHandler<HTMLDivElement> | MouseEventHandler<HTMLSpanElement> | undefinednone
refAllows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).((instance: HTMLDivElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement | null> | ((instance: HTMLSpanElement | null) => void | (() => VoidOrUndefinedOnly) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLSpanElement | null> | null | undefinednone
relstring | undefinednone
styleCSSProperties | undefinednone
titlestring | undefinednone

What it does

Wraps children in pre/code with padded, bordered surfaces.

Overflow-x keeps wide snippets usable on mobile.

Composition and API

Tone adjusts text color consistently with other typography primitives.

Extend via className when embedding inside cards.

Common use cases

  • Installation commands.
  • JSON payloads in docs.
  • Diff excerpts for reviews.
  • Sample env blocks with warnings.

Accessibility

Labels describe the snippet purpose.

Ensure focus order still reaches surrounding explanatory text.

Next.js integration notes

Avoid importing massive highlighters into server layouts unnecessarily.

Lazy-load heavy highlighting clientside when needed.

FAQ

Does CodeBlock highlight syntax?

Not by default—pipe highlighted nodes as children or integrate a highlighter in your app shell.

How does language prop help?

It shapes aria-label text for assistive technologies and future highlighting integrations.

Can children include JSX?

Pass plain text children for simplest cases; advanced highlighting may inject spans inside code.