@awesome-cordova-library/splashscreen
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

id: plugin-splashscreen title: Splashscreen tags:

  • cordova
  • capacitor
  • ionic
  • javascript
  • typescript
  • plugin
  • mobile
  • splashscreen

Splashscreen

This plugin displays and hides a splash screen while your web application is launching. Using its methods you can also show and hide the splash screen manually.

Online documentation

Cordova documentation

Installation

Cordova

cordova plugin add cordova-plugin-splashscreen
npm install @awesome-cordova-library/splashscreen

Capacitor / Ionic

npm install cordova-plugin-splashscreen
npm install @awesome-cordova-library/splashscreen
npx cap sync

Vanilla

Declaration

class SplashScreen {
  static show(): void;
  static hide(): void;
}

Usages

import SplashScreen from "@awesome-cordova-library/SplashScreen";

// Displays the splash screen.
SplashScreen.show();

// Dismiss the splash screen.
SplashScreen.hide();

React

Declaration

const useSplashScreen: () => {
  show: () => void;
  hide: () => void;
};

Usages

import { useEffect } from "react";
import useSplashScreen from "@awesome-cordova-library/splashscreen/lib/react";

function App() {
  const { show, hide } = useSplashScreen();

  useEffect(() => {
    show();
    setTimeout(() => {
      hide();
    }, 3000);
  }, []);

  return <div />;
}

Package Sidebar

Install

npm i @awesome-cordova-library/splashscreen

Weekly Downloads

8

Version

1.0.1

License

SEE LICENSE IN LICENSE

Unpacked Size

7.64 kB

Total Files

7

Last publish

Collaborators

  • joazco