// button.blade.php@props(['rounded' => false]) <button {{ $attributes->class([ 'bg-red-100 text-red-800', 'rounded' => $rounded ]) }}> {{ $slot }}</button> // view.blade.php// Non-rounded:<x-button>Submit</x-button> // Rounded:<x-button rounded>Submit</x-button>
Tip given by @godismyjudge95