Blade
Conditionally add classes
When a slot is set
<div {{ attributes->class(['text-lg', isset($aside) ? 'danger' : 'success']) }}>
{{ $main }}
</div>
Slots
Slot attributes
<div {{ $attributes->class(['border']) }}>
<h1 {{ $heading->attributes->class(['text-lg']) }}>
{{ $heading }}
</h1>
{{ $slot }}
</div>