Usage
SwiftUI
M3EFab("edit") { compose() }
M3EFab("add", size: .large, color: .tertiaryContainer) {}
M3EExtendedFab("edit", label: "Compose", expanded: !scrolled) {}API
| Property | SwiftUI | Description |
|---|---|---|
| icon | _ icon: String | Icon. |
| size | .baseline .medium .large | 56 / 80 / 96dp. |
| color | M3EFabColor | primaryContainer (default), secondary/tertiary containers, or solid roles. |
| expanded | expanded: Bool | Extended FAB only: show the label. |
Guidelines
- One FAB per screen.
- Collapse the extended FAB while the user scrolls content, and expand it again at rest.