ScrollEdgeEffectStyle

A structure that specifies blur transitions between scrolling content and an area with controls, such as toolbars.

StructureiOS 26.0+macOS 26.0+tvOS 26.0+watchOS 26.0+visionOS 26.0+ScrollEdgeEffectStyle in SwiftUI

Declaration

React
type ScrollEdgeEffectStyle = 'automatic' | 'hard' | 'soft';
Swift
struct ScrollEdgeEffectStyle

Pass a literal, or build one with SwiftUI.ScrollEdgeEffectStyle from import { SwiftUI } from 'swiftui-react-native'.

Type properties

  • 'automatic'SwiftUI.ScrollEdgeEffectStyle.automatic

    A scroll edge effect the system applies automatically when pinned content overlaps scrolling content.

  • A scroll edge effect that provides a linear, nearly opaque boundary between pinned controls and scrolling content.

  • A scroll edge effect that provides a subtle, blurred boundary between pinned controls and scrolling content.

Overview

By default, the system sets an automatic scroll edge effect style to provide a visual transition between scrolling content and stationary controls at both edges of the scroll view in the scrolling direction. The system determines which style to apply based on the platform and context. The ScrollEdgeEffectStyle.hard style provides a more opaque, clearly defined linear boundary, and the ScrollEdgeEffectStyle.soft style provides a subtle blurred transition:

@TabNavigator { @Tab("Hard") { @Image(source: "ScrollEdgeEffectStyle-2", alt: "A partial image of a list scrolling behind a bottom toolbar on iPhone. The area where the toolbar overlaps the list content is nearly opaque, with a defined, straight horizontal line at the top.", deviceFrame: "iPhone16-bottom-half") { ScrollEdgeEffectStyle.hard scroll edge style } } @Tab("Soft") { @Image(source: "ScrollEdgeEffectStyle-1", alt: "A partial image of a list scrolling behind a bottom toolbar on iPhone. The area where the toolbar overlaps the list is translucent and blurry and gets progressively more opaque from the top to the bottom.", deviceFrame: "iPhone16-bottom-half") { ScrollEdgeEffectStyle.soft scroll edge style } } @Tab("None") { @Image(source: "ScrollEdgeEffectStyle-3", alt: "A partial image of a list scrolling behind a bottom toolbar on iPhone. The area where the toolbar overlaps the list is transparent.", deviceFrame: "iPhone16-bottom-half") { No scroll edge style } } }

Specify a ScrollEdgeEffectStyle for a scroll view using View.scrollEdgeEffectStyle(_:for:) when the automatic style the system applies isn't appropriate for your content and controls. Apply View.scrollEdgeEffectHidden(_:for:) to a scroll view to remove the scroll edge effect entirely for an edge you specify.

From Apple’s SwiftUI documentation. Code samples there are Swift.

Used by

See also

More in Styles.