Skip to content

ButtonsKit is a SwiftUI package offering a collection of customizable button styles for iOS apps. Includes primary, secondary, gradient, ghost, pill, and more, with full customization options to match your design needs.

Notifications You must be signed in to change notification settings

ceviixx/ButtonsKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎛️ ButtonsKit

A SwiftUI package that provides a large collection of reusable and customizable ButtonStyles for iOS.
Ideal for building structured, stylish, and consistent UIs – including Primary, Secondary, Ghost, Gradient, Pills, Chips, and more.


🚀 Features

  • ✅ 15+ modern ButtonStyles
  • ✅ Supports Color, Gradient, Material, AnyShapeStyle
  • ✅ Ghost, Outline, Capsule, Toggle, Segment & Icon Buttons
  • LoadingButton with async/await support
  • ButtonsKitPreviewView for live preview of all styles
  • ✅ Easy to customize and extend

🎨 Available Styles

Category Styles
Standard PrimaryButtonStyle, SecondaryButtonStyle, DestructiveButtonStyle, DisabledButtonStyle
Custom CustomColorButtonStyle, StyledBackgroundButtonStyle
Gradients LinearGradientButtonStyle, RadialGradientButtonStyle, AngularGradientButtonStyle
Ghost & Outline GhostButtonStyle, CapsuleGhostButtonStyle, OutlinedButtonStyle
Special Buttons PillButtonStyle, ToggleButtonStyle, SegmentedButtonStyle
Icon & Label IconButtonStyle, LabeledIconButtonStyle, ToolbarButtonStyle
Components LoadingButton, ToggleChipButton

📦 Installation

Swift Package Manager

In Xcode:

  1. Go to File > Add Packages
  2. Enter the repository URL: https://github.com/ceviixx/ButtonsKit.git
  3. Add the HapticsKit library to your target.

🧪 Preview & Demo

All styles are shown in a live preview:

ButtonsKitPreviewView()

🛠 Usage Examples

Primary Button

Button("Save") {
    // Action
}
.primaryButtonStyle()

Gradient Button

Button("Get Started") { }
.linearGradientButtonStyle(
    gradient: Gradient(colors: [.blue, .purple])
)

Toggle Chip Button

@State private var isSelected = true

ToggleChipButton(isSelected: $isSelected) {
    Label("Active", systemImage: "star.fill")
}

Async Loading Button

@State private var isLoading = false

LoadingButton(isLoading: $isLoading, style: PrimaryButtonStyle()) {
    try await Task.sleep(nanoseconds: 1_000_000_000)
} label: {
    Text("Loading…")
}

About

ButtonsKit is a SwiftUI package offering a collection of customizable button styles for iOS apps. Includes primary, secondary, gradient, ghost, pill, and more, with full customization options to match your design needs.

Topics

Resources

Stars

Watchers

Forks

Languages