Skip to contentSkip to navigationSkip to topbar
Paste assistant Assistant
Figma
Star

Detail Text

Version 3.1.0GithubStorybookPeer review pending

Detail text is typography used for short pieces of secondary text content.

Guidelines

Guidelines page anchor

About Detail Text

About Detail Text page anchor

The Detail Text component is used for small pieces of text that are secondary to body text in the hierarchy of a page. Common examples include an image caption, chart element legend, or a paragraph footnote.

Detail Text should not be used for body text, and should be reserved for small pieces of content only. It should not be used solely for its stylistic properties within other typographic elements.

The Detail Text component is a div element by default. You can modify the element in situations where a div isn’t semantically correct. For example, set as=”figcaption” if working with Detail Text inside a figure element(link takes you to an external page).

If your Detail Text is used to describe another element, use an id for the Detail Text component and aria-describedby for the other element to make the connection clear.

(information)

Detail Text is not the same as alt text on images. The context and content of your usage might mean including alt text for further detail, or making alt text an empty string to prevent redundancy. Learn more about alt text and when to use it.(link takes you to an external page)


Detail Text below an image

Detail Text below an image page anchor

Use Detail Text to add a caption below an image.

Detail Text below primary content

Detail Text below primary content page anchor

Use Detail Text to add a description below primary content for extra context.

Detail Text with no top margin

Detail Text with no top margin page anchor

Detail Text includes a marginTop prop to remove its default top margin of space30.

Detail Text as a footnote

Detail Text as a footnote page anchor

Use Detail Text to add a footnote below a paragraph.


Do

Use Detail Text for small pieces of text that are not the main content of the UI, like graph legends and image captions

Don't

Don’t use Detail Text for body content. Consider using Paragraph instead.

Do

Use Detail Text semantically

Don't

Don’t use Detail Text for stylistic purposes within other typography. Consider using the Text primitive instead.