data-display/DSTag
DSTag
data-displayRemovable label with a custom colour, used for categorisation and filtering.
iOS 17+macOS 14+
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
| Prop | Type | Default | Description |
|---|---|---|---|
| labelreq | String | — | Tag text. |
| color | Color | DSColor.primary | Tag accent colour. |
| onRemove | (() -> Void)? | nil | Shows × 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)
}
}
}