Skip to content

Language Switcher Placement Bug Caused by w-fit Class in Plugin #138

@vishvjit-pinetco

Description

@vishvjit-pinetco

The language switcher does not respect the configured placement options such as TopCenter, TopRight, BottomCenter, or BottomRight.
Instead, it always appears in the top-left or bottom-left corner of the screen.

This behavior is caused by the Tailwind class w-fit, which restricts the width of the wrapper and prevents proper alignment based on the selected placement.

The issue is located in the following file:
vendor/bezhansalleh/filament-language-switch/resources/views/language-switch.blade.php

Problematic class:
fls-display-on fixed w-fit flex p-4 z-50

Corrected class:
fls-display-on fixed w-full flex p-4 z-50

I am using Filament v4 and Laravel 12, and this issue occurs with this setup.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions