F
Filament3mo ago
uendel

Is it possible to make the Checkbox element have its label before the input?

When creating a Checkbox element, it comes with the input before the label, I wanted to create it with the input after the label, I didn't see anyting on the documentation, is it possible?
Solution:
That worked: ``` Checkbox::make('check') ->extraFieldWrapperAttributes(['class' => 'reverse-checkbox']),...
Jump to solution
2 Replies
toeknee
toeknee3mo ago
That would tend to be LTR. You could actually do a custom css class with extraAttributes and flex resverse
Solution
uendel
uendel3mo ago
That worked:
Checkbox::make('check')
->extraFieldWrapperAttributes(['class' => 'reverse-checkbox']),
Checkbox::make('check')
->extraFieldWrapperAttributes(['class' => 'reverse-checkbox']),
.reverse-checkbox label {
flex-direction: row-reverse;
}
.reverse-checkbox label {
flex-direction: row-reverse;
}
Want results from more Discord servers?
Add your server