Skip to main content
Content Interaction Modifier

Configure the behavior of swipe gestures on a modal presentation.

Updated over 8 months ago

By default, when a user swipes on a Scroll View in a resizable modal presentation, the presentation grows to the next detent. Therefore, a Scroll View embedded in the presentation only scrolls after it reaches its largest size.

Use the Content Interaction modifier to control which action takes precedence. You can choose from 2 Interaction parameters:

  • Resize (default) - The presentation will only scroll after it reaches its largest detent.

  • Scroll - The presentation will start scrolling through its content first upon swiping.


Note

Users can still resize a presentation using the drag indicator.

For example, you can request that swipe gestures scroll content first by applying the Content Interaction modifier to the instance of your Sheet component, therefore resizing the Sheet only after hitting the end of the Scroll View.

Did this answer your question?