Home

Awesome

Fab. 🛍️

<p align="center"> <a href="https://cocoapods.org/pods/Fab" style="text-decoration:none"> <img alt="Platform" src ="https://img.shields.io/cocoapods/p/Fab.svg?style=flat"/> </a> <a href="https://cocoapods.org/pods/Fab" style="text-decoration:none"> <img alt="Pod Version" src ="https://img.shields.io/cocoapods/v/Fab.svg?style=flat"/> </a> <a href="https://github.com/Carthage/Carthage" style="text-decoration:none"> <img alt="Carthage compatible" src ="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat"/> </a> <a href="https://developer.apple.com/swift" style="text-decoration:none"> <img alt="Swift Version" src ="https://img.shields.io/badge/language-swift%205-brightgreen.svg"/> </a> <a href="https://github.com/chriszielinski/Fab/blob/master/LICENSE" style="text-decoration:none"> <img alt="GitHub license" src ="https://img.shields.io/badge/license-MIT-blue.svg"/> </a> <br> <img src ="https://raw.githubusercontent.com/chriszielinski/Fab/master/readme-assets/Fab.gif"/> <br> <br> A <b>F</b>loating <b>A</b>ction <b>B</b>utton for macOS. Inspired by Material Design, and written in Swift. <br> Based on Lourenço Marinho's <a href="https://github.com/lourenco-marinho/ActionButton"><code>ActionButton</code></a> for UIKit. <br> </p>

Features

Installation

Fab is available for installation using CocoaPods or Carthage.

CocoaPods

pod "Fab"

Carthage

github "chriszielinski/Fab"

Requirements

Usage

Create FabItems

let shareItem = FabItem(label: "Share", shareImage)
shareItem.action = { item in
	print("Selected \"Share\"")
}

let emailItem = FabItem(label: "Email", emoji: "✉️") { item in
	print("Selected \"Email\"")
}

Create Fab with items.

let fab = Fab(attachedTo: aView, items: [shareItem, emailItem])

Documentation

There are a lot of properties you can dabble with. You can check out the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.

Try Me

Includes a Playground and Demo.app.

// ToDo:

// CouldDo:

Acknowledgements

Contributors

License

Fab is released under the MIT license. See LICENSE for details.