FABUI

1.1.0

Floating Action Button for SwiftUI
fatihdurmaz/FABUI

What's New

v1.1.0

2024-06-10T06:38:26Z

Example files added.

Floating Action Button for SwiftUI

Swift Platform License Version

FABUI is a Swift package that allows the creation of customizable Floating Action Buttons (FAB) using SwiftUI.

Customization

You can customize the FABModifier with various parameters:

  • icon: The icon displayed on the FAB.
  • color: The background color of the FAB.
  • iconColor: (Optional) The color of the icon. Default is white.
  • shapeStyle: (Optional) The shape of the FAB. Default is circle. You can use .roundedRectangle(cornerRadius) to specify a rounded rectangle with a corner radius.
  • radius: (Optional) The shadow radius of the FAB. Default is 1.
  • action: The action to perform when the FAB is tapped.

Requirements

  • Swift 5.5 or later
  • iOS 17.0 or later

Installation

You can include this package in your project via Swift Package Manager. In your Xcode project, go to "File" -> "Swift Packages" -> "Add Package Dependency" and add the following URL:

https://github.com/fatihdurmaz/FABUI

Usage/Examples

import SwiftUI
import FABUI

struct ContentView: View {
    var body: some View {
        NavigationStack {
            VStack {
                Text("Hello, SwiftUI!")
            }
            .fab(icon: Image(systemName: "plus"), color: .orange, action: {
                print("Hello, SwiftUI!")
            })
            .navigationTitle("FABUI")
        }
    }
}

Licence

This project is licensed under the MIT License. See the LICENSE file for more information.

Contributing

If you would like to contribute, please submit a pull request or report an issue. Thank you for your contributions!

Description

  • Swift Tools 5.10.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Nov 24 2024 06:39:49 GMT-1000 (Hawaii-Aleutian Standard Time)