Join the Webstudio community

Updated 2 months ago

Tabs not working with collections

At a glance
I want to have a "Tabs" component which is changing according to my variable.
I hope my video explains what I want to do.

Problem is, that the tabs with don´t seem to work with a collection item.
Is this my fault?

Is my problem clear?
J
c
J
35 comments
Ehm no I think it´s a different problem
So you added a value attribute to your tabs and provided them a unique value from the collection?
Can you screenshot so i can see? I haven't tried this on tabs but suspect thats the issue
You need to specify an attribute called Value and provide it with something unique
Attachment
image.png
Though I'm looking at which instance because on Accordions its just the parent Item but Tabs have multiple wrappers
I think you apply it to both the tab trigger and tab content
so they maintain a relationship
e.g. tab trigger 1 as Value "asdf" and tab content 1 as Value "asdf"
But the tab trigger and the tab content don´t have a value attribute (yet)
You´re the king
One thing though, how can I edit the default value?
I know it´s in the tabs, but how can I make it depending on the variable?
Sweet. Can you provide a screenshot so I can add that to docs?
On Tabs instance IIRC there is a default
Yeah, let me show you what I mean
BTW you can reference the Radix docs to understand what properties there are to modify https://www.radix-ui.com/primitives/docs/components/tabs
Ah maybe just bind the first collection value to the default value?
Yeah.. just found out xD
Ok, so what do you need for the docs?
Best res image you can send of the Tab Trigger and Value in view and the Tab Content and value in view
like this?
Attachment
Screenshot_2024-11-21_at_16.35.09.png
Yes but with the Navigator in view to just to make sure people know what to select
Like this?
Attachments
Screenshot_2024-11-21_at_16.39.04.png
Screenshot_2024-11-21_at_16.38.57.png
yep perfect thanks! will get this added to docs
@John Siciliano, would these images work for the docs?
Attachments
tab-trigger.png
tab-content.png
Simply so you don't need to click into them to see what's happening.
Add a reply
Sign up and join the conversation on Discord