@capacitor/splash-screen
The Splash Screen API provides methods for showing or hiding a Splash image.
Install
npm install @capacitor/splash-screen
npx cap sync
Example
import { SplashScreen } from '@capacitor/splash-screen';
// Hide the splash (you should do this on app launch)
await SplashScreen.hide();
// Show the splash for an indefinite amount of time:
await SplashScreen.show({
autoHide: false
});
// Show the splash for two seconds and then automatically hide it:
await SplashScreen.show({
showDuration: 2000,
autoHide: true
});