chriszielinski / Fab

🛍️ A Floating Action Button for macOS. Inspired by Material Design, and written in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fab. 🛍️

Platform Pod Version Carthage compatible Swift Version GitHub license


A Floating Action Button for macOS. Inspired by Material Design, and written in Swift.
Based on Lourenço Marinho's ActionButton for UIKit.


Features

  • Dark Mode

  • + more.

Installation

Fab is available for installation using CocoaPods or Carthage.

pod "Fab"
github "chriszielinski/Fab"

Requirements

  • macOS 10.12+

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:

  • Tests.

// CouldDo:

  • Use CALayer.
  • Internal refactoring.

Acknowledgements

Contributors

License

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

About

🛍️ A Floating Action Button for macOS. Inspired by Material Design, and written in Swift.

License:Other


Languages

Language:Swift 93.7%Language:Ruby 3.5%Language:Objective-C 2.7%