How do I create anchor links in the tab bar using Webflow?

TL;DR
  • Assign unique IDs to each section you want to link to (e.g., #about, #contact).  
  • Create a custom tab bar using a div with text or link blocks, styled like tabs, and link each to its corresponding section using anchor links.  
  • Optionally use Webflow interactions or custom JavaScript to highlight the active tab based on scroll position.

To create anchor links in a tab bar in Webflow, you'll need to link each tab to a section of the same page using unique IDs. Webflow's Tabs component doesn't support anchor links by default, so this requires a manual setup.

​

1. Set IDs on Target Sections

​

  • Select each section on your page that you want to link to via a tab.
  • In the Element Settings panel, set a unique ID (e.g., section-one, pricing, contact).
  • These IDs will become your anchor links (e.g., #section-one).

​

2. Replace Tabs with Anchor Links (Manual Setup)

​

Because the default Tabs component in Webflow is designed for toggling content within the same wrapper, it won't navigate to anchors. To simulate a "tab bar" appearance with anchor functionality, you’ll need to build a custom nav bar or link set:

​

  • Add a div block to act as your tab bar.
  • Inside this div, add Link Blocks or Text Links styled like tabs.
  • Set each link’s URL to the ID of the section, using the # syntax (e.g., #section-one).

​

3. Style the Tab Bar

​

  • Use flexbox or grid to align the links horizontally.
  • Apply tab-like styles (e.g., padding, background, hover states) to make them look like actual tabs.

​

4. Make Active States Work (Optional JS Required)

​

Webflow doesn’t handle active link state tracking with anchor links natively. If you want the active tab style to update as you scroll, you’ll need to:

​

  • Use Webflow’s default scroll-based interactions.
  • Or add custom JavaScript to detect which section is in view and apply an active class to the corresponding link.

​

Summary

​

To create anchor links in a tab bar in Webflow, build a custom horizontal link bar using divs and link blocks that point to section IDs (e.g., #about, #contact). Avoid using the native Tabs component for this, as it's not built for anchor navigation.

Rate this answer

Other Webflow Questions