iOS — Liquid Glass JS behaviour

Sheet with detents

The iOS sheet with medium and large detents: it parks between two heights, the parent page steps back and scales, the grabber drags, and letting go mid-way springs to the nearest detent.

Documentation

Real scenarios

The component as it is used in a product — not a specimen grid.

A sheet that parks at two heights

Open the photo details: the parent page steps back, rounds and scales to 92% while the sheet rises to the medium or large detent. Drag the grabber (or the header) — letting go mid-way springs to the nearest detent using position and flick velocity. Scrim tap or Escape dismisses; for keyboards, the grabber itself is a button that swaps detents.

My Albums

Istanbul, autumn 2025 · 24 photos

Bosphorus Bridge
Emirgan Park
Galata Tower
Istiklal Street
Bazaar rooftop
Yıldız Park

Important props

Important props
Prop Type Default What it does
detents array '[medium, large]' Detents: medium half-height, large full; mix them freely.
parent-scale transform '0.92' The parent page recedes, rounds and shrinks 8%.
grabber bar '36 × 5' A 36×5px grabber with a grey gradient.

Snippet

<div class="iosheet" data-detent="medium">
    <span class="iosheet-grabber"></span>
    …content…
</div>

<style>
.iosheet { position: fixed; inset-inline: 0; inset-block-end: 0; border-radius: 12px 12px 0 0;
           background: #fff; box-shadow: 0 -8px 40px #00000033; }
.iosheet[data-detent='medium'] { block-size: 50dvh; }
.iosheet[data-detent='large'] { block-size: 97dvh; }
.iosheet-grabber { display: block; inline-size: 36px; block-size: 5px; margin: 6px auto 0;
                  border-radius: 999px; background: linear-gradient(#a1a1a8, #68686e); }
</style>