Skip to content
Removable Chips preview
Rendered from the SwiftUI source on this page.

Removable Chips

From syxUI — written for both platforms, not translated between them.

Chips with a remove button.

Badges · SwiftUI · iOS 17

  • badges
  • swiftui

The actual source

RemovableTags.swift
// Removable Chips · syxUI · https://syxui.dev/components/tag-removable
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

let tgBlue = Color(red: 0.0, green: 0.47, blue: 1.0)

// Removable chips
struct RemovableTags: View {
    var body: some View {
        HStack(spacing: 8) {
            ForEach(["React", "Swift", "Figma"], id: \.self) { t in
                HStack(spacing: 5) { Text(t).font(.system(size: 13, weight: .medium)); Image(systemName: "xmark").font(.system(size: 9, weight: .bold)) }.foregroundStyle(tgBlue).padding(.horizontal, 10).padding(.vertical, 6).background(tgBlue.opacity(0.12), in: Capsule())
            }
        }
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17