Did you ever find a solution?
How do you create a UI Blade component for a Filament field?
For some reason, not all of the Filament form fields have relative UI Blade components. Can someone please explain how to create a Blade component for the Toggle field, as an example?
I know how to use the Filament forms method in a Resource class. I want to use a Blade component like <x-filament::input.toggle /> within a custom Livewire page. I would like to use the existing Filament Toggle field. This is already possible with the Filament Select input field via <x-filament::input.select />, but there is no Toggle UI blade component.
Here are the current available UI Blade components for form fields: https://filamentphp.com/docs/3.x/support/blade-components/overview
I tried adding the following to the AppServiceProvider:
Filament::serving(function () {
Blade::component('filament::input.toggle', \Filament\Forms\Components\Toggle::class);
});
but got the following error:
[Method Filament\Forms\Components\Toggle::resolve does not exist.](http://localhost/organization/set-preferences?oid=9502ce34-a1f2-4f12-b6a2-553440775a0c#top)
I'm sure there are a lot of gaps in my understanding of the source code thus far as it's pretty complicated.
I also tried extending the Toggle field, but still had same resolve issue.
Please or to participate in this conversation.