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.
- 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.mediumandDetent.largeare semantic and adapt to platform conventions.- Fraction values should be between 0 and 1.