Usage
SwiftUI
M3EMaterialShape(liked ? .heart : .circle).frame(width: 64)
M3EMaterialShape(.softBurst, spinDuration: 20).frame(width: 48)
Image("avatar").resizable().clipShape(M3EShape.cookie9Sided)API
| Property | SwiftUI | Description |
|---|---|---|
| shape | M3EShape | One of 35 shapes; changing it morphs. |
| color | color: Color? | Fill; primary by default. |
| rotation | rotation: Double | Degrees. |
| spinDuration | spinDuration: Double (s) | Continuous spin; runs on the platform's animation layer. |
| motion | motion: M3ESpatialSpring | Morph spring. |
Guidelines
- Use a few shapes with intent; one strong shape beats many.
- Keep text off busy shapes like burst and boom.