Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

troccoli's avatar

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?

0 likes
0 replies

Please or to participate in this conversation.