Skip to content

Repository files navigation

SwiftiOSSwiftUISPMLicense

🎨 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

ParameterTypeDefaultDescription
iconLeadingString?nilLeading SF Symbol
iconTrailingString?nilTrailing SF Symbol
messageStringRequiredButton text
colorColor.blueButton color
isSelectedBooltrueFilled or outline
fontSizeCGFloat16Text 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!

About

Beautiful, customizable SwiftUI button components with icons, animations, and selection states. Lightweight and easy to integrate.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages