Webflow sync, pageviews & more.
NEW

How can I create buttons in Webflow that link to specific slides in a slider? I've tried using unique IDs for the slides and images but they're not working. Thank you, David.

TL;DR
  • Assign a unique class to the slider and use button click interactions in Webflow to trigger the “Go to Slide” action.
  • Target slides by their zero-based index (e.g., Slide 1 = 0) in each button’s interaction settings.

To link buttons to specific slides in a Webflow slider, simply adding unique IDs to individual slides won’t work. Webflow sliders don’t support anchor links (#id) for slide navigation because slides are managed with JavaScript and not standard page anchors.

Here’s how to correctly link buttons to specific slides using Interactions.

1. Give Each Slide a Unique Index

  • Select the Slider component in your Webflow project.
  • Click into each Slide (Slide 1, Slide 2, etc.).
  • Note that Webflow numbers slides from 0 (Slide 1 = 0, Slide 2 = 1, etc.).
  • You don’t need to assign an ID to slides; instead, you’ll target them by index in an interaction.

2. Assign a Unique Class or ID to the Slider

  • Select your slider (not an individual slide), then go to the Settings panel (D).
  • Apply a unique class, like MainSlider.
  • This helps target the component easily in Interactions.

3. Create Buttons That Trigger the Slider Navigation

  • Add a Button or Link Block for each desired slide.
  • Optional: Add text labels like “Go to Slide 2”.

4. Add Interactions to Each Button

  • Select a button, then go to the Interactions panel (lightning icon).
  • Under Element Trigger, choose Mouse Click (Tap).
  • Create a new interaction, then add an Action > Slider > Go to Slide.
  • Choose the Slider Class (e.g., MainSlider), then set the Slide Index (0-based: Slide 1 = 0, Slide 2 = 1, etc.).
  • Repeat for each button you want to control a specific slide.

5. Test the Buttons in Preview Mode

  • Click Preview.
  • Clicking each button should jump directly to the assigned slide.

Summary

To link buttons to specific slides in a Webflow slider, use Click Interactions with the “Go to Slide” action instead of anchor links. Assign a unique class to the Slider and use index-based targeting (0-based) in interactions tied to each button.

Rate this answer

Other Webflow Questions