
Status Pills
From syxUI — written for both platforms, not translated between them.
Colored status pills - active, pending, failed.
Badges · SwiftUI · iOS 17
- badges
- swiftui
The actual source
StatusPills.swift
// Status Pills · syxUI · https://syxui.dev/components/tag-status
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
let tgGreen = Color(red: 0.16, green: 0.66, blue: 0.40)
let tgOrange = Color(red: 0.98, green: 0.55, blue: 0.10)
let tgRed = Color(red: 0.90, green: 0.24, blue: 0.28)
let tgGray = Color(red: 0.55, green: 0.56, blue: 0.60)
func tagPill(_ text: String, _ color: Color) -> some View {
Text(text).font(.system(size: 13, weight: .semibold)).foregroundStyle(color).padding(.horizontal, 12).padding(.vertical, 6).background(color.opacity(0.14), in: Capsule())
}
struct StatusPills: View { var body: some View { HStack(spacing: 8) { tagPill("Active", tgGreen); tagPill("Pending", tgOrange); tagPill("Failed", tgRed); tagPill("Draft", tgGray) } } }
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17

