Widget Color()

I'm doing some initial work with Widgets and it seems the ->color() function isn't working for me.

Here is how I'm using it:

<?php

namespace App\Filament\Widgets;

use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;

class AgentFinancialOverview extends BaseWidget
{
    protected function getStats(): array
    {
        return [
            Stat::make('Amount Billed', '$11.2k')
                ->icon('heroicon-o-arrow-trending-up'),
            Stat::make('LOI Pending', '$2.1k')
                ->icon('heroicon-o-clipboard'),
            Stat::make('Uncollected', '$1.4k')
                ->color('danger')
                ->icon('heroicon-o-currency-dollar'),
        ];
    }
}

Output of this is attached.

When I added descriptions and description colors those worked so not sure why the widget 'color' itself isn't.

Thanks for any insight!
3kphEEX.png
Solution
value or label
->value(new HtmlString('<span class="text-danger-600">Value</span>'))
Was this page helpful?