Selection
Components for making choices and selections. Includes toggles, checkboxes, radio groups, sliders, and chips for single or multiple selection scenarios.
8 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.
DSFilterBar
Horizontally scrolling row of single-select filter chips.
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: "0.1.0")
// In any SwiftUI file
import SwiftDS
struct MyView: View {
var body: some View {
VStack(spacing: DSSpacing.md) {
// Use any selection component here
}
}
}