data-display/DSTag

DSTag

data-display
since 0.1.0

Removable label with a custom colour, used for categorisation and filtering.

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

Purpose

User-generated categories, filters, and skill tags.

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
labelreqString—Tag text.
colorColorDSColor.primaryTag accent colour.
onRemove(() -> Void)?nilShows × button when provided.

Examples

Filter tags

Active filters in a search screen.

swift
HStack {
    ForEach(activeFilters) { filter in
        DSTag(filter.name, color: filter.color) {
            viewModel.removeFilter(filter)
        }
    }
}

Related Components