How to Achieve Radio Option Styling

Hello Community, Im trying to add styling to my radio options, such as border and padding

                $fields[] = Forms\Components\Radio::make("scores.{$subcategory->id}")
                    ->label($subcategory->name)
                    ->inline()
                    ->options($scoreOptions)
                    ->extraAttributes([
                        'class' => 'border border-gray-300 rounded-lg px-4 py-2 cursor-pointer hover:border-gray-500 focus:border-blue-500 transition-all duration-200',
                    ])
                    ->default(null) // Default to "Skipped"
                    ->required();


when i do this, this only add the style to the container of all radio instead of each indivitual radio
image.png
Solution
That will just apply to the container.

extraInputAttributes is like what you want...
Was this page helpful?