Skip to content

Add toggle component - #2726

Merged
calebporzio merged 3 commits into
mainfrom
toggle
Aug 11, 2026
Merged

Add toggle component#2726
calebporzio merged 3 commits into
mainfrom
toggle

Conversation

@calebporzio

@calebporzio calebporzio commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What changed

  • add a free-tier flux:toggle component built on ui-switch semantics
  • support wire:model, checked and disabled states, outline/solid icon transitions, text labels, tooltips, sizes, variants, and active icon colors
  • use the outline button treatment by default while keeping the control surface neutral when toggled
  • add Toggle to the Flux publish command
  • allow the accent wrapper to inherit the application accent when no explicit color is supplied

Why

Building a compact button-shaped binary control currently requires users to manually combine switch behavior, icon swapping, state styling, and accessibility. This component provides that treatment while reusing the existing switch behavior and form integration.

Validation

  • companion Playwright coverage exercises switch semantics, keyboard interaction, icon transitions, colors, variants, sizes, and disabled states
  • 10 Toggle browser tests pass
  • Flux docs production build passes

Companion PRs

  • livewire/flux-pro#541
  • livewire/flux-docs#185

@calebporzio
calebporzio marked this pull request as ready for review August 11, 2026 11:19
@calebporzio
calebporzio merged commit 395ce5c into main Aug 11, 2026
@utsavsomaiya

Copy link
Copy Markdown

Thanks 🥳

@calebporzio
calebporzio deleted the toggle branch August 13, 2026 09:34
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.

2 participants