F
Filamentβ€’7mo ago
slamx_

Add class to Layout Grid

Is it possible to add a class to the Grid Layout Component?
7 Replies
Tally
Tallyβ€’7mo ago
Yes, try this πŸ™‚
->extraAttributes(['class' => 'yourclass'])
->extraAttributes(['class' => 'yourclass'])
on your Grid Component
slamx_
slamx_OPβ€’7mo ago
But this adds a class or a extra wrapper before the Grid is rendered, is it possible to add a class to the main grid div?
Tally
Tallyβ€’7mo ago
yeah true that's how the components work... what are you trying to do... if it's custom CSS then it will be no problem targeting the grid
slamx_
slamx_OPβ€’7mo ago
I've aligned the child elements, for example a toggle between a select will always have to much white space on the bottom
Tally
Tallyβ€’7mo ago
this wouldn't be a problem using css selectors for that specific grid with your class
slamx_
slamx_OPβ€’7mo ago
I made a solution with sub selector for the grid element πŸ™‚
Tally
Tallyβ€’7mo ago
aaah nice!!
Want results from more Discord servers?
Add your server