data-display/DSEmptyState

DSEmptyState

data-display
since 0.1.0

Placeholder view with an SF Symbol, title, description, and optional CTA button.

iOS 17+macOS 14+watchOS 10+tvOS 17+visionOS 1+

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
iconString"tray"SF Symbol name.
titlereqString—Heading text.
messagereqString—Explanatory body text.
actionLabelString?nilAction button label. The button shows only when both actionLabel and action are set.
action(() -> 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.",
    actionLabel: "Clear filters",
    action: { viewModel.clearFilters() }
)

Related Components