VueFlux
Home
  • v5
  • v6
  • v7
Demos
GitHub
Home
  • v5
  • v6
  • v7
Demos
GitHub
  • Overview
  • Changelog
  • Installation and usage
  • SSR with Nuxt
  • Components
    • VueFlux
    • FluxButton
    • FluxCube
    • FluxGrid
    • FluxImage
    • FluxParallax
    • FluxTransition
    • FluxVortex
    • FluxWrapper
  • Complements
    • FluxCaption
    • FluxControls
    • FluxIndex
    • FluxPagination
    • FluxPreloader
  • Transitions
    • Blinds 2D
    • Blinds 3D
    • Blocks 1
    • Blocks 2
    • Book
    • Camera
    • Concentric
    • Cube
    • Explode
    • Fade
    • Fall
    • Kenburn
    • Round 1
    • Round 2
    • Slide
    • Swipe
    • Warp
    • Waterfall
    • Wave
    • Zip
  • Custom transitions

FluxControls

Warning

I am using here the latest 2.6 vue syntax for slots, but if your Vue version is older check Named-Slots to see how slots are used in previous versions.

Description

The included component to display controls with the buttons previous, next, play and pause.

Attributes

slider

Is the VueFlux instance component from which to read the captions.

If you place this complement as a direct child in the VueFlux component you don't need to pass this attribute.

  • Type: VueFlux
  • Required: false

Example of controls inside vue-flux

<vue-flux
   :options="vfOptions"
   :images="vfImages"
   :transitions="vfTransitions">

   <template v-slot:controls>
      <flux-controls />
   </template>
</vue-flux>
import {
   VueFlux,
   FluxControls
} from 'vue-flux';

export default {
   components: {
      VueFlux,
      FluxControls,
   },

   data: () => ({
      vfOptions: {
         autoplay: true
      },
      vfImages: [ 'URL1', 'URL2', 'URL3' ],
      vfTransitions: [ 'fade', 'slide' ],
   }),
}

Example of controls outside vue-flux

<vue-flux
   :options="fluxOptions"
   :images="fluxImages"
   :transitions="fluxTransitions"
   ref="slider">
</vue-flux>

<flux-controls v-if="mounted" :slider="$refs.slider" />
import {
   VueFlux,
   FluxControls,
} from 'vue-flux';

export default {
   components: {
      VueFlux,
      FluxControls,
   },

   data: () => ({
      mounted: false,
      vfOptions: {
         autoplay: true,
      },
      vfImages: [ 'URL1', 'URL2', 'URL3' ],
      vfTransitions: [ 'fade', 'slide' ],
   }),

   mounted() {
      this.mounted = true;
   },
}

Properties

vf

The VueFlux instance component.

  • Type: VueFlux

display

Will return true if the slider is loaded and mouse moved over.

  • Type: Boolean

captions

The array of captions passed originally to the VueFlux component.

  • Type: Array

Methods

getCaption(index)

Gets the caption element corresponding to the index captions array.

If no index defined will return the one of current image.

  • index
    • Type: Number
    • Required: false

getCaptionText(index)

Gets the caption text corresponding to the index captions array.

If no index defined will return the one of current image.

  • index
    • Type: Number
    • Required: false
Last Updated: 10/24/23, 4:45 PM
Prev
FluxCaption
Next
FluxIndex