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

Download Toast

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

A download-complete toast.

Banners · SwiftUI · iOS 17

  • banners
  • swiftui

The actual source

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

import SwiftUI

let btGreen = Color(red: 0.16, green: 0.66, blue: 0.40)

// Download complete toast
struct DownloadToast: View {
    var body: some View {
        HStack(spacing: 12) { Image(systemName: "checkmark.circle.fill").font(.system(size: 18)).foregroundStyle(btGreen); Text("Download complete").font(.system(size: 14, weight: .medium)).foregroundStyle(.white); Spacer(minLength: 12); Text("Open").font(.system(size: 14, weight: .semibold)).foregroundStyle(Color(red: 0.45, green: 0.72, blue: 1.0)) }.padding(.horizontal, 16).padding(.vertical, 13).frame(width: 320).background(Color(red: 0.15, green: 0.15, blue: 0.17), in: RoundedRectangle(cornerRadius: 14, style: .continuous)).shadow(color: .black.opacity(0.15), radius: 12, y: 5)
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17