DropletSettingsToolbarMenu

A pill in Droppy's Settings toolbar that opens a menu (DroppyKit 1.18.0): "Add" with what can be added, a sort order, or what can be done to the page's subject as a whole.

@MainActor struct DropletSettingsToolbarMenu

DropletSettingsToolbarMenu("More", iconOnly: "ellipsis", items: [
    DropletSettingsToolbarMenuItem("Duplicate", systemImage: "plus.square.on.square") { model.duplicate() },
    .separator,
    DropletSettingsToolbarMenuItem("Delete", systemImage: "trash", isDestructive: true) { model.delete() },
])

The menu is AppKit's own, with its keyboard, checkmarks and section titles, and opens under the pill.

Initializers

init(_:iconOnly:items:)

@MainActor init(_ title: String, iconOnly systemImage: String, items: [DropletSettingsToolbarMenuItem])

A round pill with systemImage alone; title is its tooltip and accessibility label.

init(_:systemImage:items:)

@MainActor init(_ title: String, systemImage: String? = nil, items: [DropletSettingsToolbarMenuItem])

A pill with a title, systemImage before it when you name one, and a chevron after it.

Properties

body

@MainActor var body: some View { get }