DroppyCircleButtonStyle
The circular icon button for an icon-only action: the Liquid Glass disc the File Tray puts on an item (remove, pin) and the shelf's floating close chip, the host's DroppyCircleButtonStyle.
@MainActor struct DroppyCircleButtonStyle
The circular icon button for an icon-only action: the Liquid Glass disc the File Tray puts on an item (remove, pin) and the shelf's floating close chip, the host's DroppyCircleButtonStyle. 32pt by default; the File Tray uses 20 on an item and the shelf 24 for a control inside a row. A bold glyph at 40% of the diameter, the adaptive ink, the shared hover and press.
For the 24pt controls inside a live-activity row use DroppyLiveActivityControlStyle instead: that row is Dynamic Island chrome and its controls are the deliberate iOS wash, not glass. For a control inside a shelf widget use DroppyWashCircleButtonStyle: every control a widget draws is the wash since 1.21.0, and this disc stays for the droplets that already use it and for a control floating over content outside a widget.
Initializers
init(size:)
@MainActor init(size: CGFloat = 32)
Creates the style.
- Parameter size: Diameter in points. The host's default is 32.
init(size:destructive:solidFill:foregroundColorOverride:)
@MainActor init(size: CGFloat, destructive: Bool, solidFill: Color?, foregroundColorOverride: Color?)
Creates the style with the host's other arms.
- Parameters:
- size: Diameter in points.
- destructive: A delete, remove or forget: the glyph is red on the same neutral glass, so the one control on a row that takes something away reads as such. Never for a close or a reset.
- solidFill: When set, the disc is this exact opaque colour instead of glass (a classic black puck, a success flash) and the glyph takes contrast ink.
- foregroundColorOverride: The glyph colour, when the label must not take the ink the fill chooses (the File Tray's orange pin).
Methods
makeBody(configuration:)
@MainActor func makeBody(configuration: Configuration) -> some View