vue-glide icon indicating copy to clipboard operation
vue-glide copied to clipboard

Next/Previous Arrow Control

Open tylerwiegand opened this issue 5 years ago • 5 comments

JUST IN CASE anyone is about to spent too much time looking (like I did) for support for the previous and next arrows, look no further than the Workbench.vue file in the vue-glide-js folder. Inside your vue-glide component just paste that bad boy in there and you got your buttons.

<vue-glide>
   <vue-glide-slide>
      content here
   </vue-glide-slide>
   <template slot="control">
      <button data-glide-dir="<">prev</button>
      <button data-glide-dir=">">next</button>
   </template>
</vue-glide

tylerwiegand avatar Jan 17 '20 00:01 tylerwiegand

@tylerwiegand How can you both of the buttons as a whole? I've tried wrapping the two buttons inside one div and use a class on that, but then the button functionally breaks down. Essentially, what I'm trying to accomplish is centering the buttons in the middle of my slider. Currently they are up against the left edge of the glide container.

tyler-morales avatar Sep 09 '20 04:09 tyler-morales

@tylerwiegand How can you both of the buttons as a whole? I've tried wrapping the two buttons inside one div and use a class on that, but then the button functionally breaks down. Essentially, what I'm trying to accomplish is centering the buttons in the middle of my slider. Currently they are up against the left edge of the glide container.

I did it: image

Don't forget to use default css, so the slider wont break '~vue-glide-js/dist/vue-glide.css';

josegus avatar Sep 14 '20 13:09 josegus

@josegus I tried what you did, but the buttons aren't functional. Have you checked their functionality?

Screen Shot 2020-09-15 at 11 34 08 PM

tyler-morales avatar Sep 16 '20 04:09 tyler-morales

@josegus I tried what you did, but the buttons aren't functional. Have you checked their functionality?

Screen Shot 2020-09-15 at 11 34 08 PM

yes, I tried, it worked for me.

I'm just wrapping the control slot with a custom div, it should be enough to make it customizable

josegus avatar Sep 16 '20 13:09 josegus

@tylerwiegand https://antonreshetov.github.io/vue-glide/slots/#control

antonreshetov avatar Apr 03 '21 04:04 antonreshetov