UI図鑑
Gestures · 12 · アクション

Drag to Dismiss

ドラッグで閉じる

drag_to_dismiss_sheet デモ
Drag to Dismiss のデモ

ほかの呼び名

Swipe Down to CloseInteractive DismissPull Down to Dismiss
Material 3
Bottom sheets(drag to dismiss)
Material 2
Sheets: bottom(drag to dismiss)
Android (Compose)
ModalBottomSheet(既定でドラッグで閉じる)
iOS (HIG)
Sheets(drag to dismiss)
SwiftUI
.sheet(.interactiveDismissDisabled で制御)
Web
該当なし(Pointer Events で自作)
Flutter
showModalBottomSheet(enableDrag: true) / 自作(GestureDetector + Transform)

概要

モーダルを指の動きに追従させて閉じる。途中で離すと戻る、一定距離を超えると閉じる。写真ビューアでは背景が徐々に透明になる。

使いどころ

Bottom Sheet、全画面の画像ビューア、iOS 風の sheet。

関連