RobinCK / vue-gallery

:camera: Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. 🇺🇦
https://robinck.github.io/vue-gallery/
MIT License
470 stars 85 forks source link

Controls markup customizing by slots #122

Open pwnz22 opened 4 years ago

pwnz22 commented 4 years ago

Hello, @RobinCK

Can i somehow customize the prev & next buttons markup? I need to add something like <a class="prev"> <span></span></a> and also change close button markup.

pwnz22 commented 4 years ago

Found slots that are not in the docs. Also default classes not changing fiddle

calaoa commented 4 years ago

Hey @pwnz22, Indeed, the prev & next buttons can be customized via slots, and the close button as well:

    <vue-gallery @close="index = null" :id="id" :images="images" :index="index" :options="getOptions()">
      <slot ref="gallery"></slot>
      <span slot="prev">&lt;</span>
      <span slot="next">&gt;</span>
    </vue-gallery>

I added a paragraph covering slots in this fork: https://github.com/bab0uk/vue-gallery/commit/34df3215385e2533a246bdf605977373b23e4819