← Plugins / Splash Screen
This official Apache Cordova plugin displays and hides the native splash screen shown while
your app starts up. You control it from JavaScript — typically hiding it once your first view
is ready — and configure its appearance and timing through config.xml preferences.
cordova plugin add cordova-plugin-splashscreen
The plugin is exposed on navigator.splashscreen after deviceready:
| Method | Description |
|---|---|
navigator.splashscreen.show() | Display the splash screen. |
navigator.splashscreen.hide() | Dismiss the splash screen. |
Most of the behaviour is set declaratively in config.xml:
| Preference | Description |
|---|---|
AutoHideSplashScreen | If false, the splash stays up until you call hide() yourself. |
SplashScreenDelay | How long (ms) to keep the splash on screen when auto-hide is on. |
FadeSplashScreen | Whether the splash fades out instead of disappearing instantly. |
FadeSplashScreenDuration | Length of the fade-out animation in milliseconds. |
ShowSplashScreenSpinner | Show a loading spinner over the splash image. |
Disable auto-hide in config.xml, then hide the splash once your app is ready:
<!-- Keep the splash up until JavaScript hides it -->
<preference name="AutoHideSplashScreen" value="false" />
document.addEventListener("deviceready", onReady, false);
function onReady() {
// Render your first screen, then dismiss the splash.
setTimeout(function () {
navigator.splashscreen.hide();
}, 500);
}
AutoHideSplashScreen and hide manually to avoid a flash of blank screen before your UI paints.