Skip to content

Splash Screen

This library allows you to add the splash screen used for Zappar’s example projects.

You can use this library by downloading a standalone zip containing the necessary files, by linking to our CDN, or by installing from NPM for use in a webpack project.

Standalone Download

Download the bundle from this link.

Unzip into your web project and reference from your HTML like this:

<script src="zappar-splash.js"></script>

CDN

Reference the zappar-splash.js library from your HTML like this:

<script src="https://libs.zappar.com/zappar-splash/0.0.0-rc.1/zappar-splash.js"></script>

NPM Webpack Package

Run the following NPM command inside your project directory:

npm install --save @zappar/examples-splash

Then import the library into your JavaScript or TypeScript files:

import { showUI } from "@zappar/splash";

Displaying the UI

To display the splash screen in your project, add the following:

import { showUI } from "../src/index";
showUI({
// Hide the screen when user taps on the button.
onClick: (e) => {
// Pass 'false' to skip fading out.
e.destroy();
},
title: "My title",
subtitle: "My subtitle",
buttonText: "SUBMIT",
// background: "",
// logo: "",
});