SkeletonText
SkeletonText shows a placeholder for loading text to improve perceived performance.
Page navigation navigation
React
experimental
Figma
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
| Name | Default | Description |
|---|---|---|
size | 'bodyMedium' | 'display' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall' | 'subtitle'Size of the text that the skeleton is replacing. |
lines | 1 | numberNumber of lines of skeleton text to render. |
maxWidth | stringMaximum width that the line(s) of skeleton text can take up. Accepts any valid CSS | |
className | stringClass name for custom styling. |