
CTA Button
From syxUI — written for both platforms, not translated between them.
A wide call-to-action with a trailing arrow.
Buttons · SwiftUI · iOS 17
- buttons
- swiftui
The actual source
CTAButtonCard.swift
// CTA Button · syxUI · https://syxui.dev/components/btn-cta
// 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)
// CTA button with arrow
struct CTAButtonCard: View {
var body: some View {
HStack {
Text("Start free trial").font(.system(size: 16, weight: .semibold))
Spacer()
Image(systemName: "arrow.right").font(.system(size: 15, weight: .semibold))
}.foregroundStyle(.white).padding(.horizontal, 20).padding(.vertical, 15)
.background(btnBlue, in: RoundedRectangle(cornerRadius: 14, style: .continuous)).frame(width: 300)
}
}
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17


