Get tab label as dynamic content?

Is there a way to reference a tab’s label within one of the tab panel’s children so, for example, I could have a headline element in the panel with text that dynamically displays the tab label content (sort of like a chapter heading)? It would be pretty handy in general to be able to output element labels dynamically - I can see the values in the element dev toolkit, just don’t know if I can dynamically reference fields like tab_label_content.

Hello @TiDs,

Thanks for writing in! With the default Tab element, it may not be possible. May I suggest that you create a Tab Component element where you can specify the tab label and be able to dynamically use it to display as a headline inside the Tab Panel as well. If you are not familiar with the Component Builder yet, you can start by checkout out these resources:

Best Regards.

I thought to do this at first, but setting a Tab component up as a list group would only allow for panel content (ie list items) populated through parameter values, ie would not allow for building out individual tab content with things like rows or other more complex builder elements. And each individual tab would have to be built with the same inner content because it will be the consumer of the list items. Guess it’s best to just stick with a Tab template since I have no way of predicting what the client will want to include in these tabs in the future.

Thank you for the update.

Have you tried using Slots or dropzones? Please check this documentation for more details.

https://theme.co/docs/component-builder-overview#advanced-component-usage

This option can be enabled for one of the Tabs, allowing it to accommodate additional elements.

Let us know if you need more info.

Best regards.