Skip to content
Copied Toast preview
Rendered from the SwiftUI source on this page.

Copied Toast

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

A compact copied pill.

Banners · SwiftUI · iOS 17

  • banners
  • swiftui

The actual source

CopiedToast.swift
// Copied Toast · syxUI · https://syxui.dev/components/bt-copied
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

// Compact copied pill
struct CopiedToast: View {
    var body: some View {
        HStack(spacing: 8) { Image(systemName: "checkmark").font(.system(size: 13, weight: .bold)); Text("Copied").font(.system(size: 14, weight: .medium)) }.foregroundStyle(.white).padding(.horizontal, 18).padding(.vertical, 11).background(Color(red: 0.15, green: 0.15, blue: 0.17), in: Capsule()).shadow(color: .black.opacity(0.15), radius: 10, y: 4)
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17