A Floating Action Button for macOS. Inspired by Material Design, and written in Swift.
Based on Lourenço Marinho's ActionButton
for UIKit.
Fab
is available for installation using CocoaPods or Carthage.
pod "Fab"
github "chriszielinski/Fab"
- macOS 10.12+
let shareItem = FabItem(label: "Share", shareImage)
shareItem.action = { item in
print("Selected \"Share\"")
}
let emailItem = FabItem(label: "Email", emoji: "✉️") { item in
print("Selected \"Email\"")
}
let fab = Fab(attachedTo: aView, items: [shareItem, emailItem])
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.
Includes a Playground and Demo.app.
- Tests.
- Use CALayer.
- Internal refactoring.
- Based on Lourenço Marinho's
ActionButton
for UIKit.
- Chris Zielinski — Original author.
Fab is released under the MIT license. See LICENSE for details.