Inputs
Components for data entry and user input. Includes text fields, search bars, pickers, and other form controls for collecting information from users.
10 components available
DSTextField
Text field with support for label, placeholder, leading/trailing icons, hint, error message, focus and disabled states.
DSSecureField
Password input with a show/hide toggle. Shares the same visual language as DSTextField.
DSSearchBar
Dedicated search input with a magnifying glass icon, clear button, and optional cancel button.
DSTextArea
Multi-line text input that expands as the user types, with an optional character counter.
DSOTPField
6-digit one-time password input with individual digit boxes, auto-advance, and paste support.
DSPhoneField
Phone number input with a country code picker, flag icon, and automatic formatting.
DSDatePicker
Date (and optional time) picker with a calendar grid popover. Wraps the native DatePicker with DS token styling.
DSColorPicker
Colour swatch grid with a custom-colour option via the system colour picker. Supports a predefined palette.
DSSelectField
NewDropdown menu that shows options and updates a binding with the selected value.
DSColorSelector
NewGrid of tappable color circles that updates selection on tap.
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 inputs component here
}
}
}