Skip to content

roslog00/ExpandingButton

Repository files navigation

Expanding button

Gum button. Contains Small, Medium, Large sizes. I tried to recreate the gum effect of the button.

enum SizeButton {
  case s, m, l
}

Expanding Button

Swift Package Manager

In Xcode go to Project -> Your Project Name -> Package Dependencies -> Tap Plus. Insert url:

https://github.com/roslog00/ExpandingButton

or adding it to the dependencies of your Package.swift:

dependencies: [
    .package(url: "https://github.com/roslog00/ExpandingButton", .upToNextMajor(from: "1.0"))
]

SwiftUI

You can use basic way via ExpandingButton:

let button = ExpandingButton(text: "Agree")

Customisation

If you need customisation font, colors or any other, make view:

let button = ExpandingButton(text: "Agree", 
                             font: .title2,
                             size: .l,
                             textColor: .white,
                             backgroundColor: .black,
                             cornerRadius: 20,
                             kerning: 40)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages