All Projects → atrinh0 → Buttoncraft

atrinh0 / Buttoncraft

Licence: mit
Craft that perfect SwiftUI button effect 👌🏼

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Buttoncraft

PygameWidgets
A module for use with Pygame. Includes fully customisable buttons, textboxes, sliders and many more, as well as the ability to create and run animations on these widgets.
Stars: ✭ 34 (-43.33%)
Mutual labels:  buttons
aioneframework
Aione Framework: All-in-one lightweight mobile first front-end framework to design websites, web applications, mobile applications, progressive web applications having large number of examples, documentation, tutorials, community support, components.
Stars: ✭ 13 (-78.33%)
Mutual labels:  buttons
Leaflet.easybutton
leaflet control buttons with icons and callbacks
Stars: ✭ 408 (+580%)
Mutual labels:  buttons
giveaways-example
Example for @Nuggies-bot NPM
Stars: ✭ 27 (-55%)
Mutual labels:  buttons
DiscordBot-Template
A boilerplate / template for discord.js bots with 100% coverage of Discord API, command handler, error handler based on https://discordjs.guide/
Stars: ✭ 129 (+115%)
Mutual labels:  buttons
button-entity-row
Adds buttons to call services to entity cards
Stars: ✭ 73 (+21.67%)
Mutual labels:  buttons
liquid button
Liquify your buttons, web demo at website
Stars: ✭ 18 (-70%)
Mutual labels:  buttons
Superbadges
Emoji Tab Bar button badges ✨
Stars: ✭ 47 (-21.67%)
Mutual labels:  buttons
btns
A collection of buttons with cool hover effects
Stars: ✭ 78 (+30%)
Mutual labels:  buttons
Ssspinnerbutton
Forget about typical stereotypic loading, It's time to change. SSSpinnerButton is an elegant button with a diffrent spinner animations.
Stars: ✭ 357 (+495%)
Mutual labels:  buttons
dislash.py
A Python wrapper for discord slash-commands and buttons, designed to extend discord.py.
Stars: ✭ 172 (+186.67%)
Mutual labels:  buttons
reactionmenu
A library to create a discord paginator. Supports pagination with Discords Buttons feature and reactions.
Stars: ✭ 68 (+13.33%)
Mutual labels:  buttons
discordjs-button-pagination
A simple package for pagination using buttons introduced in discord.js v13.
Stars: ✭ 39 (-35%)
Mutual labels:  buttons
simply-djs
A Simple, Easy and Beginner friendly Discord.js Package for everyone. Uses Discord.js v13
Stars: ✭ 62 (+3.33%)
Mutual labels:  buttons
Arduinomenu
Arduino generic menu/interactivity system
Stars: ✭ 520 (+766.67%)
Mutual labels:  buttons
codemirror-buttons
CodeMirror buttons addon
Stars: ✭ 30 (-50%)
Mutual labels:  buttons
streamdeck
Golang API for the Corsair / Elgato StreamDeck
Stars: ✭ 46 (-23.33%)
Mutual labels:  buttons
Compoundbuttongroup
An Android library to easily implement compound buttons
Stars: ✭ 52 (-13.33%)
Mutual labels:  buttons
Ng Bootstrap
Angular powered Bootstrap
Stars: ✭ 7,872 (+13020%)
Mutual labels:  buttons
Ltfinderbuttons
My Finder buttons collection for macOS.
Stars: ✭ 269 (+348.33%)
Mutual labels:  buttons

buttoncraft (SwiftUI 2.0 App)

Experimenting with SwiftUI 2.0 whilst creating a practical app to craft that perfect button style.

✈️ Testflight

https://testflight.apple.com/join/pZDhygQt

👨🏻‍💻 Code outputted from app

struct MyButtonStyle: ButtonStyle {
    func makeBody(configuration: Self.Configuration) -> some View {
        configuration.label
            .background(Capsule()
                            .foregroundColor(configuration.isPressed ? Color.primary.opacity(0.75) : Color.primary))
            .scaleEffect(configuration.isPressed ? CGFloat(0.85) : 1.0)
            .rotationEffect(.degrees(configuration.isPressed ? 0.0 : 0))
            .blur(radius: configuration.isPressed ? CGFloat(0.0) : 0)
            .animation(Animation.spring(response: 0.35, dampingFraction: 0.35, blendDuration: 1))
    }
}

extension Button {
    func myButtonStyle() -> some View {
        self.buttonStyle(MyButtonStyle())
    }
}

// to use
Button(action: { }) {
    Text("just like that")
        .font(Font.body.bold())
        .padding()
        .foregroundColor(Color.primary)
        .colorInvert()
}
.myButtonStyle()

Button(action: { }) {
    Image(systemName: "face.smiling")
        .font(Font.body.bold())
        .imageScale(.large)
        .padding()
        .foregroundColor(Color.primary)
        .colorInvert()
}
.myButtonStyle()

🧐 Features

  • 🔀 Randomise different settings for inspiration
  • Reset to my default style
  • Using the new iOS ColorPicker
  • Copy your perfect masterpiece as a code snippet to your clipboard

👨🏻‍⚖️ Disclaimer

This is posted as a way to share SwiftUI learnings (and is not production level code). Use it at your own risk.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].