© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
oodin53

change view dynamically in a page

Hello,

I've made a page in which I'd like to have tabs.
When I click on a tab, I want to load a different component in my page.

Is it possible to load different component on live like @livewire('components.'.$componentName) ?
Solution
I found the solution with add key parameter in component :
@livewire('components.'.$componentName, [], key($key))

and in changeTab function, add :
$this->key = random_int(-999, 999);
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Create a page dynamically
FilamentFFilament / ❓┊help
12mo ago
How to change a label for a field, in view page?
FilamentFFilament / ❓┊help
2y ago
Dynamically change defaultItems in Repeater
FilamentFFilament / ❓┊help
3y ago
Customizing a view page
FilamentFFilament / ❓┊help
3y ago