Skip to main content
Use Hold Confirm when a tap should not execute an action. Choose Confirm Morph when you want the question, progress and result to stay inside one compact button.

Hold Confirm

Keep pressing until the fill completes. The button then shows the actual server result.

Confirm Morph

Expand into a question, confirm by click, hold or countdown, then show success or Retry.
Import the FLEX action class:

Start with a hold

Press with a mouse or touch, or focus the button and hold Space or Enter. Releasing early cancels the gesture. Moving outside the button, scrolling or resizing during a pointer hold also cancels it. Escape cancels confirmation before server execution. After the gesture completes, the button shows loading until its PHP callback and after-hook finish. A successful callback shows Done; an explicit $action->failure() or rejected request shows an error and Retry. Only the executing confirmation instance becomes busy. An idle button runs no animation loop.

Inline confirmation

The morph surface keeps a fixed height and animates its width to fit each state. Text and controls enter separately; success draws a checkmark, and failure offers Retry. Reduced-motion preferences use short fades instead of spring, blur and drawing effects. Logical spacing supports RTL.

Undo is a real second operation

Undo appears only when you provide a callback. It runs through the same Filament action lifecycle and waits for its own server response. Successful undo returns to the original button; a failed undo offers Retry for the undo operation. It does not automatically reverse database changes: implement and authorize the restoration in your callback. URL actions do not offer Undo. Your undo callback can contain any application PHP logic and receives Filament’s usual injected utilities. For a record action, $record is the current record; $action is the executing FLEX action. Use $action->failure() to report an unsuccessful restoration:
This example assumes your model has an archived attribute. Replace the update with your own restoration operation. Pass null to confirmMorphUndo(null) to remove the Undo callback and button.

Handle a failure

Use failure() when your callback catches an error or returns an unsuccessful application result. Returning false by itself does not change Filament’s action status. Retry executes the callback again; make repeated operations safe in your application. Exceptions and transport failures do not produce a success animation.

Duration, cancellation and result visibility

Configuration values other than the undo callback can also be evaluated closures, using Filament’s usual utility injection. Invalid modes, time budgets and label keys throw InvalidArgumentException instead of silently changing your configuration. Question/result timeouts pause on pointer hover, when the document is hidden or the owner is inactive. Starting a hold suspends the unanswered-question timeout. These timeouts never end a pending PHP request or invent a success result.

Every label

English and Polish translations are included. Use translated strings in confirmMorphLabels() for your own wording. Labels and prompts accept plain text, not HTML.

Require a reason

The reason is required, must contain non-whitespace text and must be 3–2,000 characters. It is available as _fff_confirmation_reason in the action data. Existing action form fields remain in the form; reserve this key for the reason field. Disabling the action form with disabledSchema() while requiring a reason is rejected. If an action has a native form or uses requiresConfirmation(), completing the inline gesture opens that native modal. The trigger returns to idle; it does not report success before the form is submitted. The modal then handles its own submission progress and validation.
A hold or countdown prevents accidental input; it is not authorization. Keep policies, permissions, validation and transaction rules in your PHP operation. These also apply to direct or manipulated requests.

Appearance and integration

Use inherited label(), icon(), color(), disabled(), authorize() and action() methods. Ordinary hold preserves the Filament button size and supports rounded('none'|'sm'|'md'|'lg'|'xl'|'full') and itemCard(). Morph uses its own compact capsule geometry; its confirmation fill follows color().
For table row actions, use the package action class in recordActions(). Filament injects the current record into the callback as usual. Header, schema and Item Card actions use the same confirmation API. Each rendered instance owns its assets, gestures and state; switching tabs or closing a modal disposes its transient resources.

URL actions

Completing a URL action initiates navigation. It cannot verify that the destination loaded successfully and does not run a PHP action callback or Undo. Use openUrlInNewTab() when needed.

Application-wide settings

These helpers are request-scoped. Configure them in the request that builds your actions. bulkHoldMs() accepts 200–60,000 ms or null; obtain its value with bulkHoldMs() without an argument when defining your bulk action’s duration. It does not change every action automatically.

Events and inspection

Events bubble from the owning action element. fff-hold-complete means the gesture finished, not that PHP succeeded. fff-confirm-state carries { state, previous }; states are idle, confirming, countdown, pending, done, error. fff-confirm-result carries { operation, success } after confirm or undo completes. fff-confirm-cancel signals a cancelled confirmation. PHP getters include hasHoldConfirm() (true for both presentations), isConfirmMorph(), getHoldConfirmDuration(), getHoldConfirmSweep(), getHoldConfirmReleaseDuration(), isHoldConfirmThemed(), getHoldConfirmPalette(), getConfirmMorphMode() and getConfirmationConfiguration().

Item Card

Place confirmation actions in settings rows.

Asset loading

Understand per-instance lazy assets and shared dependencies.
Last modified on October 16, 2026