VueFlux
Home
  • v5
  • v6
  • v7
Demos
GitHub
Home
  • v5
  • v6
  • v7
Demos
GitHub
  • Overview
  • Changelog
  • Installation and usage
  • Options VS Composition
  • SSR with Nuxt
  • Resources
    • Img
    • Video
    • Component
  • 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

FluxPreloader

Description

The included component in charge of showing the spinner the resource loading progress.

Props

interface Props {
	loader: Ref<null | ResourceLoader>;
}

loader

Is the resource loader.

Example of usage

import { ref, shallowReactive } from 'vue';
import {
	VueFlux,
	FluxPreloader,
	Img,
	Book,
	Zip,
} from 'vue-flux';
import 'vue-flux/style.css';

const options = shallowReactive({
	autoplay: true,
});

const rscs = shallowReactive([
	new Img('URL1' 'img 1'),
	new Img('URL2' 'img 2'),
	new Img('URL3' 'img 3'),
]);

const transitions = shallowReactive([Book, Zip]);
<VueFlux
	:options="options"
	:rscs="rscs"
	:transitions="transitions"
>
	<template #preloader="preloaderProps">
		<FluxPreloader v-bind="preloaderProps" />
	</template>
</VueFlux>

Templating

You can customize the spinner element using the slot.

The slot will receive an object having the following schema:

interface preloaderProps = {
	loader: ResourceLoader;
	preloading: number;
	lazyloading: number;
	pct: number;
}

You can see a template example in the demo

Last Updated: 12/17/23, 1:36 AM
Prev
FluxPagination