DSStatusLabel
data-displayStatus label with icon indicating success, warning, error, info, or neutral state.
Purpose
Use to display status information with appropriate color and icon. Provides instant visual feedback.
Interactive Reference
Live showroom
Need the full visual surface?
Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().
Best for exploring:
variants, states, categories, and real app examples in one place.
Variants

.success
Green with checkmark icon

.warning
Yellow with warning icon

.error
Red with error icon

.info
Blue with info icon

.neutral
Gray with circle icon
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| textreq | String | — | Status text (first, unlabeled argument). |
| style | DSStatusLabelStyle | .neutral | .success, .warning, .error, .info or .neutral. |
| showIcon | Bool | true | Shows the leading status icon. |
| accessibilityLabel | String? | nil | VoiceOver override. |
Examples
Order status
Map your model to a style.
switch order.status {
case .delivered:
DSStatusLabel("Delivered", style: .success)
case .pending:
DSStatusLabel("Pending", style: .warning)
case .cancelled:
DSStatusLabel("Cancelled", style: .error)
}System health
Display system or service status.
HStack(spacing: DSSpacing.sm) {
DSText("API Status:", style: .callout)
DSStatusLabel("Operational", style: .success)
}Usage Guidelines
- Use semantic colors that match the status meaning
- Keep text short and clear (1-2 words)
- Icons provide quick visual scanning
When to Use
✓ Use DSStatusLabel for:
- • Status indicators with semantic meaning (success, warning, error)
- • System health or service status displays
- • Order, task, or process status in lists
- • Real-time status updates with icons
✗ Avoid using for:
- • Non-status labels (use DSBadge)
- • Interactive filters (use DSChip)
- • Simple text without semantic meaning (use Text)
- • Count indicators (use DSBadge)
Consider instead:
For non-status labels without semantic icons
For interactive, selectable filters
For full-width status banners
Accessibility
VoiceOver
Announces '[text], Status, [style]' (e.g., 'Delivered, Status, Success')
Keyboard
- • Not interactive - display only
Dynamic Type
✓ Supported
Contrast
WCAG AA compliant (icon and text 4.5:1)
Traits
.isStaticTextIcon meaning conveyed via style nameColor not sole indicator