
Filled Text Field
From syxUI — written for both platforms, not translated between them.
A filled text field input — self-contained SwiftUI, styled from system tokens.
Inputs · SwiftUI · iOS 17
- inputs
- swiftui
The actual source
FilledFieldCard.swift
// Filled Text Field · syxUI · https://syxui.dev/components/input-filled
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
extension View {
func formaCard(_ pad: CGFloat = 18) -> some View {
self.padding(pad)
.background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 20, style: .continuous))
.overlay(RoundedRectangle(cornerRadius: 20, style: .continuous).stroke(Color.primary.opacity(0.06), lineWidth: 1))
.shadow(color: .black.opacity(0.05), radius: 14, x: 0, y: 6)
}
}
// 12. Filled field
struct FilledFieldCard: View {
var body: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 7) {
Text("USERNAME").font(.system(size: 11, weight: .semibold)).foregroundStyle(.secondary)
Text("alexmakes").font(.system(size: 16)).frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 14).padding(.vertical, 14).background(Color.primary.opacity(0.05), in: RoundedRectangle(cornerRadius: 12))
}
VStack(alignment: .leading, spacing: 7) {
Text("EMAIL").font(.system(size: 11, weight: .semibold)).foregroundStyle(.secondary)
Text("Enter your email").font(.system(size: 16)).foregroundStyle(.tertiary).frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 14).padding(.vertical, 14).background(Color.primary.opacity(0.05), in: RoundedRectangle(cornerRadius: 12))
}
}
.formaCard()
}
}
iOS 17 · 1 dependencies
Dependencies
- SwiftUI
- formaCard
Requires iOS 17


