Jul 28, 2025
0
Level 6
How to center a toggle inside a table with Flux?
I have a page where I allow users to assign/revoke roles. This page show the list of users as rows, where the columns are the roles. Each cell is a toggle.
@foreach($this->users as $user)
<flux:table.row>
<flux:table.cell>{{ $user->name }}</flux:table.cell>
@foreach($this->roles as $role)
<flux:table.cell>
<flux:tooltip content="{{ $role->name }}">
<flux:switch wire:click="toggle({{$user->id}}, {{$role->id}})" />
</flux:tooltip>
</flux:table.cell>
@endforeach
</flux:table.row>
@endforeach
I'm trying to center the toggle and I can't do it. Can anybody help?
Please or to participate in this conversation.