Skip to main content

Properties

Detent.medium
{ detentType: 'medium' }
A standard medium-sized detent, typically around half the screen height.
Detent.large
{ detentType: 'large' }
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.
value
number
required
A number between 0 and 1 representing the fraction of screen height.

height

Creates a custom detent at a fixed height in points.
value
number
required
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.medium and Detent.large are semantic and adapt to platform conventions.
  • Fraction values should be between 0 and 1.