On a phone, Filament’s modals open as sheets from the bottom of the screen, where your thumb is. Their buttons are big and stacked.
1A confirmation
Any modal of the panel: confirmations, forms, the create modal.
Try it
- In “Deliveries”, tap ⋮ on the card of Olivia Bennett, then “Not home”.
- Tap “Cancel”.
What happens
The question slides up from the bottom. “Confirm” and “Cancel” are full-width buttons, “Cancel” at the bottom. The sheet slides down when it closes.
The code
FilamentWarpMobilePlugin::make()
// On by default; ->bottomSheets(false) keeps Filament's centred modals
->bottomSheets()
2A long form
A form taller than the phone scrolls inside the sheet.
Try it
- Tap “Report a problem” at the top of the list of deliveries.
- Tap the first field and choose a delivery.
- Scroll down inside the sheet.
What happens
The sheet fills most of the screen and scrolls inside. The list of the field opens over the sheet and is not cut off.
The code
Action::make('reportProblem')
->schema([
Select::make('delivery')->searchable()->...,
Select::make('kind')->...,
DatePicker::make('retry_on')->native(false),
// ...
])
3Drag down to close
Like a sheet in a phone app.
Try it
- Tap “Report a problem” again.
- Press the mouse button on the small grey bar at the top of the sheet and drag it down a little, then let go.
- Drag it down further (about a third of the sheet) and let go.
What happens
A short drag springs back. A longer drag closes the sheet.
The code
// Nothing to write: a modal that closes when you tap outside it
// (Filament's default) also closes with a drag down
4A sheet that stays open
A modal with closeModalByClickingAway(false) cannot be dragged closed either.
Try it
- Tap “Start my route” at the top of the list of deliveries.
- Drag the sheet down by its grey bar and let go.
- Tap “Cancel”.
What happens
The sheet springs back however far you drag it. Only its buttons close it.
The code
Action::make('startRoute')
->requiresConfirmation()
->closeModalByClickingAway(false)
Click to tap. To swipe or pull, press the mouse button and drag — the mouse works like a finger here.
You are on a phone
The phone frame is for computers. On your phone, open the app itself and follow the steps with your finger.
Open the app