StealThis .dev

Bottom Sheet

A slide-up bottom sheet modal with drag-to-dismiss, backdrop, and two variants — an info sheet and an actions sheet. No libraries.

Open in Lab
vanilla-js css
Targets: JS HTML React Native

Expo Snack

Code

Bottom Sheet

A mobile-native bottom sheet that slides up from the bottom of the screen. Supports drag-to-dismiss via touch events, a semi-transparent backdrop, and two usage patterns: info sheet and actions sheet.

How it works

  1. Clicking a trigger button shows the backdrop and slides the sheet up with translateY
  2. The sheet handle captures touchstart / touchmove / touchend to track drag distance
  3. Dragging down more than 120px dismisses the sheet; otherwise it snaps back
  4. Clicking the backdrop or a close/action button also dismisses

Variants included

  • Info sheet — title, body text, metadata rows, and a close button
  • Actions sheet — icon action list (Edit, Share, Save, Delete)

Customization

  • Set max-height on .bottom-sheet to control how tall the sheet can grow
  • Add overscroll-behavior: contain on .sheet-content to prevent body scroll
  • Extend with multiple snap points for a more complex sheet