Skip to content

Add actions to toasts - #2791

Merged
calebporzio merged 5 commits into
mainfrom
toast-actions
Sep 4, 2026
Merged

Add actions to toasts#2791
calebporzio merged 5 commits into
mainfrom
toast-actions

Conversation

@calebporzio

@calebporzio calebporzio commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The scenario

Toasts can link somewhere, but they cannot currently expose a compact action such as Undo or Retry. The toast also lives outside the Livewire component that opened it, so the action needs a transport that another component can receive.

The proposal

Support one action per toast. An action may dispatch a bubbling browser event with parameters, or render as a real link. The existing close button remains the second affordance.

The solution

This adds the public PHP action option and the recovered Flux toast-action chrome. The Flux Pro companion PR supplies the runtime behavior, and the Livewire companion PR lets a listener request preserve the action button as its loading origin.

The generated lite bundle and manifest are included.

Coordinated PRs

Verification

  • Flux Pro toast browser suite: 18 passed
  • End-to-end playground verified event dispatch, cross-component loading, and dismissal after completion

@calebporzio
calebporzio merged commit d56dfe3 into main Sep 4, 2026
1 check passed
@calebporzio
calebporzio deleted the toast-actions branch September 4, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant