SwiftUIMaterialButton

0.0.2

A material design style button for swiftUI with ripple effect.
boybeak/SwiftUIMaterialButton

What's New

version-0.0.2

2024-08-29T10:51:06Z

Opt

  1. Cancel tap gesture when press down then move too far;

SwiftUIMaterialButton

A material design style button for swiftUI with ripple effect.

video

Installation

Open XCode, File -> Add Package Denpendencies -> Search https://github.com/boybeak/SwiftUIMaterialButton.git -> Add Package.

Usage

image

import SwiftUIMaterialButton

struct MaterialButtonView : View {
    var body: some View {
        VStack {
            MaterialButton(
                action: {
                }, 
                label: {
                    Text("Default style(color: accent, raidus: 4)")
                }
            )
            
            MaterialButton(
                backgroundColor: .cyan,
                radius: 8,
                action: {
                },
                label: {
                    Text("Color: cyan, radisu: 8")
                }
            )
            
            MaterialButton(
                backgroundColor: .indigo,
                radius: 16,
                action: {
                },
                label: {
                    Text("Color: indigo, radisu: 16")
                }
            )
        }
    }
}

Description

  • Swift Tools 5.10.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon May 12 2025 05:56:20 GMT-0900 (Hawaii-Aleutian Daylight Time)