How to automatically open tabs widget based on URL?

What are you trying to accomplish
Hey team, we’ve installed the tabs widget. We worked out a way to open a specific tab based on a query param (i.e. ?utm_activeTab=3).

However, we wanted to ask if you had a suggestion to accomplish this? and if there are plans to enable a designer friendly approach rather than having to add data bindings.

We created a data bind for the tabs default active tab: Number(new URLSearchParams(window.location.search).get("utm_activeTab"))

Thanks.

Hi @luis.simon.realself!

To confirm, are you asking for an alternative way besides adding data bindings? If you use custom components, you can extend the tabs component and add this behavior. You can find the code for the tabs component here. You’re welcome to submit this feature request to https://ideas.builder.io/ as well where your team and other Builder users can upvote your idea!

1 Like