Properties
A standard medium-sized detent, typically around half the screen height.
A large detent that fills most or all of the available screen space.
Methods
fraction
Creates a custom detent at a fraction of the screen height.
A number between 0 and 1 representing the fraction of screen height.
height
Creates a custom detent at a fixed height in points.
The fixed height in points.
Usage
Standard detents
Fractional detent
Fixed height detent
Combining detent types
Notes
- Detents define the snap points where a sheet rests when dragged by the user.
- Apply
.presentationDetents to the sheet’s content (inside content: () => ...), not to the view that presents the sheet.
- Multiple detents allow users to resize the sheet between defined sizes.
- The order of detents in the array does not matter — the sheet snaps to the closest detent.
- On platforms that do not support detents, sheets typically default to full screen.
Detent.medium and Detent.large are semantic and adapt to platform conventions.
- Fraction values should be between 0 and 1.
- On Android, any
medium, fraction, or height detent maps to a single partially expanded state; the fraction and height values are not used.