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.
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.
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() }
)