Selection
Components for making choices and selections. Includes toggles, checkboxes, radio groups, sliders, and chips for single or multiple selection scenarios.
9 components available
DSToggle
On/off switch with an optional label and description. Wraps the native SwiftUI Toggle with design-token styling.
DSCheckbox
Multi-select checkbox with a checkmark animation. Supports indeterminate state for parent checkboxes.
DSRadioGroup
Single-select radio button group. Generic over any Hashable value type.
DSSlider
Range slider with min/max labels and an optional live value formatter.
DSStepper
Numeric input with − and + buttons. Respects min/max bounds and disables the buttons at limits.
DSFilterChip
Selectable pill chip with a checkmark on active state. Can be used standalone or in a multi-select group.
DSRatingStars
5-star rating component with tap-to-rate, half-star display, and read-only mode.
DSChip
NewAction chip with title, optional icons, and variant-based styling for filters and tags.
DSChipToggle
NewSelectable chip with on/off state that shows a checkmark when selected.
Quick Import Reference
// Package.swift
.package(url: "https://github.com/luizmellodev/SwiftDS-package", from: "2.0.0")
// In any SwiftUI file
import SwiftDS
struct MyView: View {
var body: some View {
VStack(spacing: DSSpacing.md) {
// Use any selection component here
}
}
}