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.
- Add a Button or Link Block for each desired slide.
- Optional: Add text labels like “Go to Slide 2”.
- 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.
- 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.