Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Karim_Taha's avatar

How to make a colorful text?

I have a Filament Section that has a text and I want this text to be bold and green, but the content() reads the HTML as normal text, not a code so how do I apply the styling?

code:

Section::make() ->schema([ Placeholder::make('club_balance') ->label(__('siteTotalBalance.total_balance')) ->content("{$availableBalance} " . __('widgets.(SAR)')),

                    TextInput::make('withdraw_amount')
                        ->label(__('siteTotalBalance.withdraw_amount'))
                        ->required()
                        ->numeric()
                        ->minValue(1)
                        ->rule(function () use ($availableBalance) {
                            return function ($attribute, $value, $fail) use ($availableBalance) {
                                if ($value > $availableBalance) {
                                    $fail(__('siteTotalBalance.exceeds_balance', ['balance' => $availableBalance]));
                                }
                            };
                        }),


                ])
                ->columns(2),
0 likes
1 reply

Please or to participate in this conversation.