CustomInput
is a SwiftUI component designed to create custom text input fields with optional icons and placeholders. This component is ideal for form elements and other data entry interfaces, providing a cohesive and visually appealing design.
CustomInput.swift
file in your SwiftUI project. File Link
text: Binding<String>
- A binding to the text that will be edited by the user in the input field.iconName: String?
- The name of the system image to be displayed at the start of the input field. Default is nil
.placeholder: String?
- The placeholder text to display when the input field is empty. Default is nil
.CustomInput
component: