Skip to content
Social Auth Buttons preview
Rendered from the SwiftUI source on this page.

Social Auth Buttons

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

A self-contained social auth buttons — SwiftUI, styled from system tokens.

Buttons · SwiftUI · iOS 17

  • buttons
  • swiftui

The actual source

SocialAuthButtons.swift
// Social Auth Buttons · syxUI · https://syxui.dev/components/button-social
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

// Social auth buttons
struct SocialAuthButtons: View {
    var body: some View {
        VStack(spacing: 10) {
            HStack(spacing: 8) { Image(systemName: "apple.logo").font(.system(size: 17)); Text("Continue with Apple").font(.system(size: 16, weight: .semibold)) }
                .foregroundStyle(.white).frame(maxWidth: .infinity, minHeight: 52).background(Color.primary, in: Capsule())
            HStack(spacing: 8) { Image(systemName: "g.circle.fill").font(.system(size: 18)); Text("Continue with Google").font(.system(size: 16, weight: .semibold)) }
                .foregroundStyle(.primary).frame(maxWidth: .infinity, minHeight: 52)
                .background(Color(.systemBackground), in: Capsule()).overlay(Capsule().stroke(Color.primary.opacity(0.15), lineWidth: 1))
            HStack(spacing: 8) { Image(systemName: "envelope.fill").font(.system(size: 15)); Text("Continue with email").font(.system(size: 16, weight: .semibold)) }
                .foregroundStyle(.secondary).frame(maxWidth: .infinity, minHeight: 52)
                .background(Color.primary.opacity(0.05), in: Capsule())
        }
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17