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.
Start with a hold
$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
- Click
- Hold
- Countdown
Undo is a real second operation
$record is the current record; $action is the executing FLEX action. Use $action->failure() to report an unsuccessful restoration:
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
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
_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 inheritedlabel(), 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().
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
openUrlInNewTab() when needed.
Application-wide settings
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.