<!--
{
  "documentType" : "article",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View-Appearance",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Appearance modifiers"
}
-->

# Appearance modifiers

Configure a view’s foreground and background styles, controls, and visibility.

## Overview

Use these modifiers to configure the appearance of a view,
including the use of color and tint, and the
application of overlays and background elements. Control the
visibility of a view and specific elements within a view.
Manage the shape and size of various controls.

For information about configuring views, see [View configuration](/documentation/SwiftUI/View-configuration).

## Topics

### Colors and patterns

[`backgroundStyle(_:)`](/documentation/SwiftUI/View/backgroundStyle(_:))

Sets the specified style to render backgrounds within the view.

[`foregroundStyle(_:)`](/documentation/SwiftUI/View/foregroundStyle(_:))

Sets a view’s foreground elements to use a given style.

[`foregroundStyle(_:_:)`](/documentation/SwiftUI/View/foregroundStyle(_:_:))

Sets the primary and secondary levels of the foreground
style in the child view.

[`foregroundStyle(_:_:_:)`](/documentation/SwiftUI/View/foregroundStyle(_:_:_:))

Sets the primary, secondary, and tertiary levels of
the foreground style.

[`allowedDynamicRange(_:)`](/documentation/SwiftUI/View/allowedDynamicRange(_:))

Returns a new view configured with the specified allowed
dynamic range.

### Tint

[`tint(_:)`](/documentation/SwiftUI/View/tint(_:))

Sets the tint color within this view.

[`listRowSeparatorTint(_:edges:)`](/documentation/SwiftUI/View/listRowSeparatorTint(_:edges:))

Sets the tint color associated with a row.

[`listSectionSeparatorTint(_:edges:)`](/documentation/SwiftUI/View/listSectionSeparatorTint(_:edges:))

Sets the tint color associated with a section.

[`listItemTint(_:)`](/documentation/SwiftUI/View/listItemTint(_:))

Sets a fixed tint color for content in a list.

### Light and dark appearance

[`preferredColorScheme(_:)`](/documentation/SwiftUI/View/preferredColorScheme(_:))

Sets the preferred color scheme for this presentation.

[`preferredSurroundingsEffect(_:)`](/documentation/SwiftUI/View/preferredSurroundingsEffect(_:))

Applies an effect to passthrough video.

### Foreground elements

[`border(_:width:)`](/documentation/SwiftUI/View/border(_:width:))

Adds a border to this view with the specified style and width.

[`overlay(alignment:content:)`](/documentation/SwiftUI/View/overlay(alignment:content:))

Layers the views that you specify in front of this view.

[`overlay(_:ignoresSafeAreaEdges:)`](/documentation/SwiftUI/View/overlay(_:ignoresSafeAreaEdges:))

Layers the specified style in front of this view.

[`overlay(_:in:fillStyle:)`](/documentation/SwiftUI/View/overlay(_:in:fillStyle:))

Layers a shape that you specify in front of this view.

[`spatialOverlay(alignment:content:)`](/documentation/SwiftUI/View/spatialOverlay(alignment:content:))

Adds secondary views within the 3D bounds of this view.

[`spatialOverlayPreferenceValue(_:alignment:_:)`](/documentation/SwiftUI/View/spatialOverlayPreferenceValue(_:alignment:_:))

Uses the specified preference value from the view to produce another
view occupying the same 3D space of the first view.

### Background elements

[`background(alignment:content:)`](/documentation/SwiftUI/View/background(alignment:content:))

Layers the views that you specify behind this view.

[`background(_:ignoresSafeAreaEdges:)`](/documentation/SwiftUI/View/background(_:ignoresSafeAreaEdges:))

Sets the view’s background to a style.

[`background(ignoresSafeAreaEdges:)`](/documentation/SwiftUI/View/background(ignoresSafeAreaEdges:))

Sets the view’s background to the default background style.

[`background(_:in:fillStyle:)`](/documentation/SwiftUI/View/background(_:in:fillStyle:))

Sets the view’s background to an insettable shape filled with a style.

[`background(in:fillStyle:)`](/documentation/SwiftUI/View/background(in:fillStyle:))

Sets the view’s background to an insettable shape filled with the
default background style.

[`alternatingRowBackgrounds(_:)`](/documentation/SwiftUI/View/alternatingRowBackgrounds(_:))

Overrides whether lists and tables in this view have alternating row
backgrounds.

[`listRowBackground(_:)`](/documentation/SwiftUI/View/listRowBackground(_:))

Places a custom background view behind a list row item.

[`scrollContentBackground(_:)`](/documentation/SwiftUI/View/scrollContentBackground(_:))

Specifies the visibility of the background for scrollable views within
this view.

[`containerBackground(_:for:)`](/documentation/SwiftUI/View/containerBackground(_:for:))

Sets the container background of the enclosing container using a view.

[`containerBackground(for:alignment:content:)`](/documentation/SwiftUI/View/containerBackground(for:alignment:content:))

Sets the container background of the enclosing container using a view.

[`glassBackgroundEffect(displayMode:)`](/documentation/SwiftUI/View/glassBackgroundEffect(displayMode:))

Fills the view’s background with an automatic glass background effect
and container-relative rounded rectangle shape.

[`glassBackgroundEffect(_:displayMode:)`](/documentation/SwiftUI/View/glassBackgroundEffect(_:displayMode:))

Fills the view’s background with a custom glass background effect and
container-relative rounded rectangle shape.

[`glassBackgroundEffect(in:displayMode:)`](/documentation/SwiftUI/View/glassBackgroundEffect(in:displayMode:))

Fills the view’s background with an automatic glass background effect
and a shape that you specify.

[`glassBackgroundEffect(_:in:displayMode:)`](/documentation/SwiftUI/View/glassBackgroundEffect(_:in:displayMode:))

Fills the view’s background with a custom glass background effect and
a shape that you specify.

[`backgroundExtensionEffect()`](/documentation/SwiftUI/View/backgroundExtensionEffect())

Adds the background extension effect to the view. The view will be
duplicated into mirrored copies which will be placed around the view on
any edge with available safe area. Additionally, a blur effect will be
applied on top to blur out the copies.

[`backgroundExtensionEffect(isEnabled:)`](/documentation/SwiftUI/View/backgroundExtensionEffect(isEnabled:))

Adds the background extension effect to the view. The view will be
duplicated into mirrored copies which will be placed around the view on
any edge with available safe area. Additionally, a blur effect will be
applied on top to blur out the copies.

### Passthrough

[`breakthroughEffect(_:)`](/documentation/SwiftUI/View/breakthroughEffect(_:))

Ensures that the view is always visible to the user, even when other
content is occluding it, like 3D models.

### Control configuration

[`defaultWheelPickerItemHeight(_:)`](/documentation/SwiftUI/View/defaultWheelPickerItemHeight(_:))

Sets the default wheel-style picker item height.

[`horizontalRadioGroupLayout()`](/documentation/SwiftUI/View/horizontalRadioGroupLayout())

Sets the style for radio group style pickers within this view to be
horizontally positioned with the radio buttons inside the layout.

[`controlSize(_:)`](/documentation/SwiftUI/View/controlSize(_:))

Sets the size for controls within this view.

[`buttonBorderShape(_:)`](/documentation/SwiftUI/View/buttonBorderShape(_:))

Sets the border shape for buttons in this view.

[`buttonRepeatBehavior(_:)`](/documentation/SwiftUI/View/buttonRepeatBehavior(_:))

Sets whether buttons in this view should repeatedly trigger their
actions on prolonged interactions.

[`headerProminence(_:)`](/documentation/SwiftUI/View/headerProminence(_:))

Sets the header prominence for this view.

[`scrollDisabled(_:)`](/documentation/SwiftUI/View/scrollDisabled(_:))

Disables or enables scrolling in scrollable views.

[`scrollBounceBehavior(_:axes:)`](/documentation/SwiftUI/View/scrollBounceBehavior(_:axes:))

Configures the bounce behavior of scrollable views along the specified
axis.

[`scrollIndicatorsFlash(onAppear:)`](/documentation/SwiftUI/View/scrollIndicatorsFlash(onAppear:))

Flashes the scroll indicators of a scrollable view when it appears.

[`scrollIndicatorsFlash(trigger:)`](/documentation/SwiftUI/View/scrollIndicatorsFlash(trigger:))

Flashes the scroll indicators of scrollable views when a value changes.

[`menuOrder(_:)`](/documentation/SwiftUI/View/menuOrder(_:))

Sets the preferred order of items for menus presented from this view.

[`menuActionDismissBehavior(_:)`](/documentation/SwiftUI/View/menuActionDismissBehavior(_:))

Tells a menu whether to dismiss after performing an action.

[`paletteSelectionEffect(_:)`](/documentation/SwiftUI/View/paletteSelectionEffect(_:))

Specifies the selection effect to apply to a palette item.

[`typeSelectEquivalent(_:)`](/documentation/SwiftUI/View/typeSelectEquivalent(_:))

Sets an explicit type select equivalent text in a collection, such as
a list or table.

### Symbol effects

[`symbolEffect(_:options:isActive:)`](/documentation/SwiftUI/View/symbolEffect(_:options:isActive:))

Returns a new view with a symbol effect added to it.

[`symbolEffect(_:options:value:)`](/documentation/SwiftUI/View/symbolEffect(_:options:value:))

Returns a new view with a symbol effect added to it.

[`symbolEffectsRemoved(_:)`](/documentation/SwiftUI/View/symbolEffectsRemoved(_:))

Returns a new view with its inherited symbol image effects
either removed or left unchanged.

### Privacy and redaction

[`privacySensitive(_:)`](/documentation/SwiftUI/View/privacySensitive(_:))

Marks the view as containing sensitive, private user data.

[`redacted(reason:)`](/documentation/SwiftUI/View/redacted(reason:))

Adds a reason to apply a redaction to this view hierarchy.

[`unredacted()`](/documentation/SwiftUI/View/unredacted())

Removes any reason to apply a redaction to this view hierarchy.

[`invalidatableContent(_:)`](/documentation/SwiftUI/View/invalidatableContent(_:))

Mark the receiver as their content might be invalidated.

[`contentCaptureProtected(_:)`](/documentation/SwiftUI/View/contentCaptureProtected(_:))

### Visibility

[`hidden()`](/documentation/SwiftUI/View/hidden())

Hides this view unconditionally.

[`labelsHidden()`](/documentation/SwiftUI/View/labelsHidden())

Hides the labels of any controls contained within this view.

[`labelsVisibility(_:)`](/documentation/SwiftUI/View/labelsVisibility(_:))

Controls the visibility of labels of any controls contained within this
view.

[`menuIndicator(_:)`](/documentation/SwiftUI/View/menuIndicator(_:))

Sets the menu indicator visibility for controls within this view.

[`listRowSeparator(_:edges:)`](/documentation/SwiftUI/View/listRowSeparator(_:edges:))

Sets the display mode for the separator associated with this specific row.

[`listSectionSeparator(_:edges:)`](/documentation/SwiftUI/View/listSectionSeparator(_:edges:))

Sets whether to hide the separator associated with a list section.

[`listSectionIndexVisibility(_:)`](/documentation/SwiftUI/View/listSectionIndexVisibility(_:))

Changes the visibility of the list section index.

[`persistentSystemOverlays(_:)`](/documentation/SwiftUI/View/persistentSystemOverlays(_:))

Sets the preferred visibility of the non-transient system views
overlaying the app.

[`scrollIndicators(_:axes:)`](/documentation/SwiftUI/View/scrollIndicators(_:axes:))

Sets the visibility of scroll indicators within this view.

[`scrollClipDisabled(_:)`](/documentation/SwiftUI/View/scrollClipDisabled(_:))

Sets whether a scroll view clips its content to its bounds.

[`sliderThumbVisibility(_:)`](/documentation/SwiftUI/View/sliderThumbVisibility(_:))

Sets the thumb visibility for `Slider`s within this view.

[`tableColumnHeaders(_:)`](/documentation/SwiftUI/View/tableColumnHeaders(_:))

Controls the visibility of a `Table`’s column header views.

[`upperLimbVisibility(_:)`](/documentation/SwiftUI/View/upperLimbVisibility(_:))

Sets the preferred visibility of the user’s upper limbs, while an
[`ImmersiveSpace`](/documentation/SwiftUI/ImmersiveSpace) scene is presented.

[`volumeBaseplateVisibility(_:)`](/documentation/SwiftUI/View/volumeBaseplateVisibility(_:))

Sets the visibility of the baseplate of a volume, which appears
when a user looks towards the ‘floor’ of a volume and during resize.
Both `automatic` and `visible` will show the baseplate.
`hidden` will never show it.

### Sensory feedback

[`sensoryFeedback(_:trigger:)`](/documentation/SwiftUI/View/sensoryFeedback(_:trigger:))

Plays the specified `feedback` when the provided `trigger` value
changes.

[`sensoryFeedback(trigger:_:)`](/documentation/SwiftUI/View/sensoryFeedback(trigger:_:))

Plays feedback when returned from the `feedback` closure after the
provided `trigger` value changes.

[`sensoryFeedback(_:trigger:condition:)`](/documentation/SwiftUI/View/sensoryFeedback(_:trigger:condition:))

Plays the specified `feedback` when the provided `trigger` value changes
and the `condition` closure returns `true`.

### Widget configuration

[`widgetAccentable(_:)`](/documentation/SwiftUI/View/widgetAccentable(_:))

Adds the view and all of its subviews to the accented group.

[`widgetCurvesContent(_:)`](/documentation/SwiftUI/View/widgetCurvesContent(_:))

Displays the widget’s content along a curve if the context allows it.

[`widgetLabel(_:)`](/documentation/SwiftUI/View/widgetLabel(_:))

Returns a localized text label that displays additional content outside
the accessory family widget’s main SwiftUI view.

[`widgetLabel(label:)`](/documentation/SwiftUI/View/widgetLabel(label:))

Creates a label for displaying additional content outside an accessory
family widget’s main SwiftUI view.

[`dynamicIsland(verticalPlacement:)`](/documentation/SwiftUI/View/dynamicIsland(verticalPlacement:))

Specifies the vertical placement for a view of an expanded Live Activity that appears in the Dynamic
Island.

[`accessoryWidgetGroupStyle(_:)`](/documentation/SwiftUI/View/accessoryWidgetGroupStyle(_:))

The view modifier that can be applied to `AccessoryWidgetGroup` to specify the shape the three
content views will be masked with. The value of `style` is set to `.automatic`, which is `.circular` by default.

[`controlWidgetActionHint(_:)`](/documentation/SwiftUI/View/controlWidgetActionHint(_:))

The action hint of the control described by the modified label.

[`controlWidgetStatus(_:)`](/documentation/SwiftUI/View/controlWidgetStatus(_:))

The status of the control described by the modified label.

### Window behaviors

[`windowDismissBehavior(_:)`](/documentation/SwiftUI/View/windowDismissBehavior(_:))

Configures the dismiss functionality for the window enclosing `self`.

[`windowFullScreenBehavior(_:)`](/documentation/SwiftUI/View/windowFullScreenBehavior(_:))

Configures the full screen functionality for the window enclosing `self`.

[`windowToolbarFullScreenVisibility(_:)`](/documentation/SwiftUI/View/windowToolbarFullScreenVisibility(_:))

Configures the visibility of the window toolbar when the window enters
full screen mode.

[`windowMinimizeBehavior(_:)`](/documentation/SwiftUI/View/windowMinimizeBehavior(_:))

Configures the minimize functionality for the window enclosing `self`.

[`windowResizeAnchor(_:)`](/documentation/SwiftUI/View/windowResizeAnchor(_:))

Sets the window anchor point used when the size of the view
changes such that the window must resize.

[`windowResizeBehavior(_:)`](/documentation/SwiftUI/View/windowResizeBehavior(_:))

Configures the resize functionality for the window enclosing `self`.

[`preferredWindowClippingMargins(_:_:)`](/documentation/SwiftUI/View/preferredWindowClippingMargins(_:_:))

Requests additional margins for drawing beyond the bounds of the window.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)