Loading States
Spinner
Notifies users that their action is being processed.- Loading initial content
- Processing actions
- Waiting for API responses
ProgressBar
Shows determinate progress for long-running operations.value?: number- Progress percentage (0-100)
Icons & Avatars
Icon
Displays SVG icons from the WordPress icon library or custom SVGs.icon: IconType | SVGElement- Icon component or SVGsize?: number- Icon size in pixels
Dashicon
Legacy icon component for WordPress Dashicons.Deprecated: Use
Icon with @wordpress/icons instead. Dashicon is maintained for backward compatibility.Avatar
Displays user profile images or initials.name?: string- User name (shows initials if no image)src?: string- Avatar image URLsize?: number- Avatar size in pixels
AvatarGroup
Displays multiple avatars in a group.avatars: Array<AvatarProps>- Array of avatar objectsmaxAvatars?: number- Maximum visible avatars (shows +N for overflow)
Status Indicators
Badge
Small label for status, counts, or categories.intent?: 'default' | 'info' | 'success' | 'warning' | 'error'- Badge color schemechildren: ReactNode- Badge content
Indicator
Simple colored dot for status indication.Text Display
Text
Typography component for consistent text styling.size?: 'body' | 'caption' | 'footnote' | 'largeTitle' | 'title'- Text sizeweight?: number- Font weight (100-900)variant?: 'default' | 'muted'- Text style variantisBlock?: boolean- Display as block elementtruncate?: boolean- Truncate with ellipsis
Heading
Semantic heading component with consistent styling.level: 1 | 2 | 3 | 4 | 5 | 6- Heading level (required)weight?: number- Font weightcolor?: string- Text color
Truncate
Truncates text with ellipsis.numberOfLines?: number- Maximum number of lines (default: 1)limit?: number- Maximum character countellipsizeMode?: 'auto' | 'head' | 'tail' | 'middle'- Ellipsis position
Color Display
ColorIndicator
Displays a color swatch.colorValue: string- Color value (hex, rgb, named)
GradientPicker
Displays gradient previews and allows gradient selection.Media Display
ExternalLink
Link that opens in a new tab with proper accessibility.target="_blank"rel="noopener noreferrer"- External link icon
- Screen reader text
FocalPointPicker
Interactive control for selecting image focal point.url: string- Image URLvalue: { x: number, y: number }- Focal point (0-1 range)onChange: (value) => void- Change handler
Placeholder
Placeholder component for empty states.icon?: IconType- Placeholder iconlabel?: string- Main labelinstructions?: string- Instructional textchildren?: ReactNode- Actions or additional content
Sandbox
Safely renders HTML content in an iframe.html: string- HTML content to rendertitle?: string- Iframe titlestyles?: string- Additional CSS styles
The Sandbox component isolates potentially unsafe HTML in an iframe, preventing it from affecting the parent page.
Data Visualization
For complex data visualization and tables, consider using:- DataViews from
@wordpress/dataviews- Table and grid views with sorting, filtering, and actions - FormTokenField - Token/tag input for displaying multiple items
Accessibility
All data display components include proper ARIA labels and roles:- Spinner includes
role="presentation"andfocusable="false" - Avatar includes fallback to initials with proper contrast
- ColorIndicator uses accessible color contrast checking
- ExternalLink announces external destination to screen readers