Skip to content

Paragraph

  • Body copy, descriptions and other running text
  • Supporting text under a heading, smaller or quieter

Choosing between showing text:

ComponentUse it forRendersFor example
HeadingThe title of a page or a section, at a rank in the outline<h1>–<h6>A page title, a card title
ParagraphA block of running text<p>Body copy, a description
TextA run of text inside other text, styled from the tokens<span>A date, a count, a name
KbdA key or a shortcut<kbd>Ctrl + K
LinkText that goes somewhere<a>Read more

Paragraphs stop at a readable line length, around 65 characters, however wide the container. Long lines are hard to follow back to the start of the next one, so the width is capped and never forced — a narrower column still wins.

A smaller, quieter paragraph for supporting text, such as a caption or small print.

import { Paragraph, Stack } from '@arun-dev/ui';
export default function ParagraphBasics() {
return (
<Stack gap="sm">
<Paragraph>
Paragraphs stop at a readable line length, around 65 characters, however wide the container.
Long lines are hard to follow back to the start of the next one, so the width is capped and
never forced — a narrower column still wins.
</Paragraph>
<Paragraph size="sm" color="secondary">
A smaller, quieter paragraph for supporting text, such as a caption or small print.
</Paragraph>
</Stack>
);
}

Paragraph is a <p>. It stops at a readable line length — --paragraph-max-inline-size, 65ch by default — as a maximum, so a narrower container still wins. The last line never ends on a single stranded word, in browsers that support text-wrap: pretty.

Size and colour are inherited unless you set them, so a paragraph inside an Alert or a Card takes the text style there.

Paragraph props
PropTypeDefaultDescription
size'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl'A step on the type scale: the --text-* token of the same name. Inherited from the text around it.
color'primary' | 'secondary' | 'muted' | 'accent'A text colour role: the --color-text-* token of the same name. Inherited from the text around it.
classNamestringConcatenated with the component's own classes, never replacing them.
renderReactElementElement or component to render instead of the default. Props, className, event handlers and ref are merged onto it.
refRef<HTMLElement>Ref to the rendered element. Merged with any ref on the render element.
…restHTMLAttributesAnything else is spread onto the rendered element, so id, aria-*, data-* and event handlers all reach the DOM.
  • The space between paragraphs belongs to the layout: put them in a Stack.
  • To centre a short paragraph, centre the block too: margin-inline: auto along with text-align: center, since it may be narrower than its container.