Skip to content
Outline Button preview
Rendered from the SwiftUI source on this page.

Outline Button

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

A bordered secondary button.

Buttons · SwiftUI · iOS 17

  • buttons
  • swiftui

The actual source

OutlineButtonCard.swift
// Outline Button · syxUI · https://syxui.dev/components/btn-outline
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

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

// Outline button
struct OutlineButtonCard: View {
    var body: some View {
        Text("Learn more").font(.system(size: 16, weight: .semibold)).foregroundStyle(btnBlue)
            .frame(maxWidth: .infinity).padding(.vertical, 15)
            .overlay(RoundedRectangle(cornerRadius: 14, style: .continuous).stroke(btnBlue, lineWidth: 1.5)).frame(width: 300)
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17