Splash Screen
The easiest splash library you need for creating SPA
npm install splash-screen
bower install splash-screen
//import all-in-one-bundle
//import splash-screen/dist/splash-screen.min.css here if you are using webpack, or inject it in your html
import { enable, destroy } from 'splash-screen';
//enable with a specific theme.
//Possible themes are: 'tailing', 'audio-wave', 'windcatcher', 'spinner-section', 'spinner-section-far', 'circular'.
enable('tailing');
//destroy the splash
destroy();
//import specific bundle
//import splash-screen/dist/splash-screen-[theme].min.css here if you are using webpack, or inject it in your html
import { enable, destroy } from 'splash-screen/dist/splash-screen-[theme]';
//enable with no arg
enable();
//destroy the splash
destroy();
Same as above
//import all-in-one-bundle
//import splash-screen/dist/splash-screen.min.css here if you are using webpack, or inject it in your html
const {enable, destroy} = require('splash-screen');
//enable with a specific theme.
//Possible themes are: 'tailing', 'audio-wave', 'windcatcher', 'spinner-section', 'spinner-section-far', 'circular'.
enable('tailing');
//destroy the splash
destroy();
//import specific bundle
//import splash-screen/dist/splash-screen-[theme].min.css here if you are using webpack, or inject it in your html
const {enable, destroy} = require('splash-screen/dist/splash-screen-[theme]');
//enable with no arg.
enable();
//destroy the splash
destroy();
<!-- import all-in-one-bundle -->
<link rel="stylesheet" href="node_modules/splash-screen/dist/splash-screen.min.css">
<script src="node_modules/splash-screen/dist/splash-screen.min.js"></script>
<script>
const splash = window['splash-screen'];
//enable with a specific theme.
//Possible themes are: 'tailing', 'audio-wave', 'windcatcher', 'spinner-section', 'spinner-section-far', 'circular'.
splash.enable('tailing');
//destroy the splash
splash.destroy();
</script>
<!-- import specific bundle -->
<link rel="stylesheet" href="node_modules/splash-screen/dist/splash-screen-[theme].min.css">
<script src="node_modules/splash-screen/dist/splash-screen-[theme].min.js"></script>
<script>
const theme = window['splash-screen-[theme]'];
//enable with no arg.
theme.enable();
//destroy the splash
theme.destroy();
</script>