Skip to content

Latest commit

 

History

History
112 lines (81 loc) · 2.86 KB

File metadata and controls

112 lines (81 loc) · 2.86 KB

Swift iOS SwiftUI SPM License

🎨 CustomLabels

Beautiful, customizable SwiftUI button components with icons and animations

FeaturesInstallationUsageComponents


📱 Overview

CustomLabels is a lightweight SwiftUI package providing three pre-styled button components for building consistent, professional interfaces in iOS apps.

✨ Features

  • 🎯 Three Components - Button labels, icon buttons, and styling modifiers
  • 🎨 Flexible Styling - Customizable colors, sizes, and states
  • Smooth Animations - Built-in transitions and effects
  • 🔄 Two Visual States - Selected (filled) and unselected (outline)
  • 🎭 Icon Support - SF Symbols integration
  • 🚀 Lightweight - Zero dependencies

📦 Installation

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/yourusername/CustomLabels", from: "1.0.0")
]

Or add via Xcode: File > Add Package Dependencies

🧩 Components

1. CustomButtonLabel

Button label with optional leading/trailing icons and selection states.

2. CustomButtonIcon

Compact circular icon button with shadow effects.

3. AppButtonStyle

Reusable view modifier for consistent button styling.

🚀 Usage

Basic Button

import CustomLabels

Button(action: { }) {
    CustomButtonLabel(
        iconLeading: "paperplane.fill",
        message: "Send",
        color: .blue
    )
}

Icon Button

CustomButtonIcon(icon: "trash.fill", color: .red)

With Modifier

Text("Continue")
    .appButtonStyle(color: .green, isSelected: true)

Selection State

CustomButtonLabel(
    message: "Option",
    color: .blue,
    isSelected: false  // Outline style
)

🎨 Customization

Parameter Type Default Description
iconLeading String? nil Leading SF Symbol
iconTrailing String? nil Trailing SF Symbol
message String Required Button text
color Color .blue Button color
isSelected Bool true Filled or outline
fontSize CGFloat 16 Text size

📋 Requirements

  • iOS 16.0+
  • Swift 6.1+
  • Xcode 15.0+

📄 License

MIT License - see LICENSE file for details.


⭐ Star this repo if you find it helpful!