Custom View field doesn't recognize css changes???

Really confused as to why my custom view field won't recognize any CSS changes. I was trying to add padding originally and couldn't figure out why it wasn't changing at all.. So I removed everything to where I literally just have <div class="bg-red-700">Text</div> in my view, and it doesn't show the background. Why would that be?

here's my class:
class ContactCard extends Component
{
    protected string $view = 'filament.forms.components.contact-card';

    protected array $items = [];

    public static function make(): static
    {
        return new static();
    }

    public function items(array $items): static
    {
        $this->items = $items;

        return $this;
    }

    public function getItems(): array
    {
        return $this->items;
    }
}


and my view file:
@foreach ($getItems() as $item)
    
    <div class="bg-red-700">Text</div>

@endforeach


and within my form:
 Tab::make('Contacts')
                        ->schema([

                            ContactCard::make('contacts')->items(User::all()->pluck('first_name', 'id')->toArray()),

                        ]),
Was this page helpful?