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

Pill Button

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

A rounded pill-shaped button.

Buttons · SwiftUI · iOS 17

  • buttons
  • swiftui

The actual source

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

import SwiftUI

// Pill button
struct PillButtonCard: View {
    var body: some View {
        Text("Get Started").font(.system(size: 16, weight: .semibold)).foregroundStyle(.white)
            .padding(.horizontal, 34).padding(.vertical, 14).background(Color.primary, in: Capsule())
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17