data-display/DSEmptyState
DSEmptyState
data-displayPlaceholder view with an SF Symbol, title, description, and optional CTA button.
iOS 17+macOS 14+
Purpose
Shown when a list, search, or section has no content.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| iconreq | String | — | SF Symbol name. |
| titlereq | String | — | Heading text. |
| messagereq | String | — | Explanatory body text. |
| ctaLabel | String? | nil | Action button label. |
| ctaAction | (() -> Void)? | nil | Action button handler. |
Examples
No search results
Empty search state with a reset action.
swift
DSEmptyState(
icon: "magnifyingglass",
title: "No results found",
message: "Try adjusting your search or filters.",
ctaLabel: "Clear filters",
ctaAction: { viewModel.clearFilters() }
)