data-display/DSEmptyState

DSEmptyState

data-display
since v1.0

Placeholder 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

PropTypeDefaultDescription
iconreqStringSF Symbol name.
titlereqStringHeading text.
messagereqStringExplanatory body text.
ctaLabelString?nilAction button label.
ctaAction(() -> Void)?nilAction 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() }
)

Related Components