# Ionic 5 - Trouble with ion segment and ion slides

**URL:** <https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299>\
**Category:** Ionic Framework\
**Created:** [February 7, 2021, 10:35am UTC](https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299 "2021-02-07T10:35:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Umberto93](https://avatars.discourse-cdn.com/v4/letter/u/858c86/32.png) [@Umberto93](https://forum.ionicframework.com/u/Umberto93)\
**Post date:** [February 7, 2021, 10:35am UTC](https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299/1 "2021-02-07T10:35:25Z")

</div>

Hi, I’m developing an app for my University and I’ve a problem with ion-segment and ion-slides. The idea is to create a ion-segment with 2 buttons in order to change slide panels and viceversa. When I click on the button, the segment animation works perfectly, but when I swipe on slides to change the active segment value, the animation doesn’t work. Here an example:

![ion-segment-trouble](https://global.discourse-cdn.com/ionicframework/original/3X/d/1/d157eb49656e040d473059fad8f1185ecafd7b56.gif)

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [February 7, 2021, 12:28pm UTC](https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299/2 "2021-02-07T12:28:05Z")

</div>

Sorry but I am trying to see what exactly is wrong. But cool UI idea if u ask me!

---

<div class="post-metadata">

**Author:** ![Umberto93](https://avatars.discourse-cdn.com/v4/letter/u/858c86/32.png) [@Umberto93](https://forum.ionicframework.com/u/Umberto93)\
**Post date:** [February 8, 2021, 11:50am UTC](https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299/3 "2021-02-08T11:50:13Z")

</div>

I tried to solve simulating click on segment button when user swipes on slide. It works but I don’t think it’s a good way to solve this problem. Any suggestions?

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [February 8, 2021, 1:19pm UTC](https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299/4 "2021-02-08T13:19:59Z")

</div>

Hi  
sorry I can’t be of more support, as I still struggle to understand what is wrong and what you actually see as the desired UI in the video you have shown.

---

<div class="post-metadata">

**Author:** ![Umberto93](https://avatars.discourse-cdn.com/v4/letter/u/858c86/32.png) [@Umberto93](https://forum.ionicframework.com/u/Umberto93)\
**Post date:** [February 8, 2021, 5:08pm UTC](https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299/5 "2021-02-08T17:08:25Z")

</div>

if you look better at the video you should see the following things:

- a smooth indicator movement when user clicks on the segment-button;
- an instantaneous movement when the user swipes the slide.

What I want is a smooth behaviour in both cases. Thanks.

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [February 8, 2021, 7:56pm UTC](https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299/6 "2021-02-08T19:56:40Z")

</div>

Ok thx  
Now I see

I dont know how u wired the segment to the slide, but assuming through ionChange on the segment to do a slide method and capturing a slide change to change the value of the segment-\> i would consider a hack on the latter, where the slide change does not change the segment via the value binding but by emulating a click in the segment button

---

<div class="post-metadata">

**Author:** ![jasperheeren](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@jasperheeren](https://forum.ionicframework.com/u/jasperheeren)\
**Post date:** [March 30, 2021, 7:05am UTC](https://forum.ionicframework.com/t/ionic-5-trouble-with-ion-segment-and-ion-slides/204299/7 "2021-03-30T07:05:46Z")

</div>

Any updates on this? Facing the same issue.
