Warp Mobile demo — a Filament panel that feels like a phone app. Try it in the phone on the right; the data is reset every hour. warpui.com About Warp Mobile Docs Ask a question Support
Skip to content

Floating button & tap targets

Two things that make a panel easier to use with one hand.

1A floating action button

->floatingOnMobile() on a header action makes it a round button at the bottom right on a phone.

Try it

  1. Click “Show this in the phone” below to open “Deliveries”.
  2. Tap the round + button at the bottom right, above the tabs.

What happens

It is the “Create delivery” button of the page: the form to add a delivery opens. On a wide screen (“Open on its own” above the phone) it is the usual button at the top of the page. Scroll to the bottom of the list: there is room under the last card, so the round button does not cover its ⋮.

The code
protected function getHeaderActions(): array
{
    return [
        CreateAction::make()->floatingOnMobile(),
    ];
}

2Tap targets of 44 px

->touchTargets() makes links, icon buttons and buttons at least 44 × 44 px to tap, the size phone makers recommend. Icons and links look the same; only the area around them that you can tap grows.

Try it

  1. Click “Show the tap areas” below. Every tap area in the phone gets a red outline.
  2. Click “Turn tap targets off” and look at the red boxes around the ⋮ buttons on the cards.
  3. Click “Turn tap targets on” again.

What happens

With the setting off, the box around each ⋮ is 36 px high, about the size of the icon. With it on, it is 44 px: the icon looks the same, but there is more room around it for your finger. The buttons at the top grow from 36 px to 44 px too.

The code
FilamentWarpMobilePlugin::make()
    ->touchTargets()

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