One Logo Pool Ball
SwiftUI · IOS API REFERENCE

PaletteSelectionEffect

struct · iOS 17.0+ · SDK 27.1

struct PaletteSelectionEffect

The selection effect to apply to a palette item. You can configure the selection effect of a palette item by using the ``View/paletteSelectionEffect(_:)`` view modifier.

Members (3)

static · iOS 17.0+

symbolVariant

TypeScript
static symbolVariant(variant: _SwiftUICore_SymbolVariants): PaletteSelectionEffect
Swift declaration
static func symbolVariant(_ variant: SymbolVariants) -> PaletteSelectionEffect

Applies the specified symbol variant when selected. - Note: This effect only applies to SF Symbols.

get · iOS 17.0+

custom

TypeScript
static get custom(): PaletteSelectionEffect
Swift declaration
static let custom: PaletteSelectionEffect

Does not apply any system effect when selected. - Note: Make sure to manually implement a way to indicate selection when using this case. For example, you could dynamically resolve the item's image based on the selection state.

get · iOS 17.0+

automatic

TypeScript
static get automatic(): PaletteSelectionEffect
Swift declaration
static let automatic: PaletteSelectionEffect

Applies the system's default effect when selected. When using un-tinted SF Symbols or template images, the current tint color is applied to the selected items' image. If the provided SF Symbols have custom tints, a stroke is drawn around selected items.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →