Badge Component

Im wanting to create a view field on a form with some badges. Should i not be able to simply do something like this that i do with other components? Right now its saying it cant find the component.
<x-filament::badge
:color="$color"
{{ $formattedState }}
</x-filament::badge>
<x-filament::badge
:color="$color"
{{ $formattedState }}
</x-filament::badge>
10 Replies
awcodes
awcodes16mo ago
It definitely exists. It’s in the support package so should be available everywhere.
Kenneth Sese
Kenneth Sese16mo ago
Your missing the closing > tag
awcodes
awcodes16mo ago
Good catch.
Mark Chaney
Mark ChaneyOP16mo ago
I get Unable to locate a class or view for component [filament::badge]. if i do
<x-filament::badge
color="info">
{{ $getRecord()->causer->role }}
</x-filament::badge>
<x-filament::badge
color="info">
{{ $getRecord()->causer->role }}
</x-filament::badge>
in a ViewField
awcodes
awcodes16mo ago
Are you on the latest filament. It didn’t exist until a few versions ago. If you’re still on alpha. Pretty sure it doesn’t exist there.
Mark Chaney
Mark ChaneyOP16mo ago
I just assumed it was already there because badges have existed forever. guess i should have looked closer.
Kenneth Sese
Kenneth Sese16mo ago
Curious, what version are you on? If you’re on alpha is it to use LW2?
Mark Chaney
Mark ChaneyOP16mo ago
@archilex yep, need to stay on that a bit longer until LW3 is a bit stable. Im on alpha131. Not technically supported of course.
Kenneth Sese
Kenneth Sese16mo ago
Understandable…hopefully soon with the new stable release just out. Still some pending issues IMO however.
awcodes
awcodes16mo ago
I agree.
Want results from more Discord servers?
Add your server