SkeletonText

SkeletonText shows a placeholder for loading text to improve perceived performance.

Page navigation navigation

React
experimental

React examples

Default

Multiple lines of text

Custom SkeletonText size

SkeletonText matches the font sizes and line heights in Primer. See typography docs and Primer Primitives for details.

titleLarge
titleMedium
titleSmall
bodyLarge
bodyMedium (default)
bodySmall
subtitle

With max width

Props

SkeletonText

NameDefaultDescription
size
'bodyMedium'
'display' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall' | 'subtitle'

Size of the text that the skeleton is replacing.

lines
1
number

Number of lines of skeleton text to render.

maxWidth
string

Maximum width that the line(s) of skeleton text can take up. Accepts any valid CSS max-width value.

className
string

Class name for custom styling.