Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Primitives
  2. Empty Text
  3. API and Development

Empty text

API and Development

View Source
Submit Issue

EmptyText renders an em dash by default with aria-label from the required label prop, so empty table cells and metadata fields stay perceivable. Inherits TextProps picks: type, color, asSpan, and optional children to override the glyph.

Props

Name

Type

Default

Description

label

string

—

—

asSpan

boolean

—

If true, renders the text as a <span> element instead of a block element (e.g. <p>). Use this when you need inline text that does not break the flow of surrounding content. Prefer block elements for standalone paragraphs or headings for better semantics and accessibility.

className

string

—

—

color

TextColor

TextColor.Base

Semantic color applied to the text.

type

TextType

TextType.BodyBase

Typography variant controlling the element tag and size.

Storybook

Interactive examples and edge cases for this component are in Storybook.

Default
Custom Children
In Key Value Data List
In Key Value Data List With Custom Labels
In Key Value Data List With List Empty Label
Snapshot

Default

Custom children

In KeyValueDataList

In KeyValueDataList with custom labels

List-level emptyLabel fallback

Previous

Empty text / Usage

Next

Empty text / Accessibility

On this page

Props
Storybook
Default
Custom children
In KeyValueDataList
In KeyValueDataList with custom labels
List-level emptyLabel fallback