filament tabs from blade dont have content
How can I add content to the tabs directly from blade? As it is now, Its just the tab items themselves
Solution:Jump to solution
```html
<div class="rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10"
x-data="{ tab: 'tab1' }">
<x-filament::tabs label="Content tabs" contained="true">
<x-filament::tabs.item @click="tab = 'tab1'" :alpine-active="'tab === 'tab1''">...
36 Replies
GitHub
Add content to the tabs blade component · filamentphp filament · Di...
I've followed the Tabs Blade Components documentation but I'm not sure how and where do I need to put the content of my tab. <x-filament::tabs label="Content tabs"> <x-fi...
Thank you! :)
Though I believe this should be mentioned in the docs
send a PR 😀
The content is outside of the field
Might be missing some styles
possible, im looking into it rn
The tabs are only the tab bar. The rest is on you 😅
😭
whyyy
It's not that hard to show/hide stuff in Livewire
@if ($activeTab == 1)
No, I can add content now
Its just not displayed properly
What is "properly" ?
Its shown outside of the tabs group
Where?
the content
Use
contained="false"
and wrap it in a section
Or is it contained="true"
?neither of them worked
I also tried
class="fi-contained"
It's definitely not a class. I think it's an property on the
tabs
components. Check the source codeYep, that what im doing rn
tryng to understand whats going on
If I overwrite the item blade from vendor (as a test), then the UI breaks. NOt sure if thats intentional
try
Ok, will try
No, because when you have contained true, the UI breaks. I tried this before
Did you wrap it in a section as I said?
Solution
Oh oops. Didnt see it. Yeah, with section it technically works.
I also added
class="m-[-1rem]"
in the div to remove the borderslegend. thank you ❤️
This works perfectly
Does this look different?
Danke schon Dennis 🙂
yeah, it looks just like the original
as in from a form layout
Okay. I thought it had more padding.
How i can Saving data to relationships using tabs
pivot table?
in form , i can solve it with section inside the tab. but i need use ->relationship('customer') in tab without section
No, I mean, create a pivot table
it will keep for example customer_id and employee_id