Capacitor Splash Screen: Config, API and Assets
Verified against@capacitor/splash-screen on npm,@capacitor/assets on npm,@capacitor/cli on npm (native project templates),Android splash screens,Migrate your splash screen to Android 12on November 4, 2026.
A Capacitor app gets its launch splash from the native projects, and the @capacitor/splash-screen plugin (8.0.2 on npm as of this check) decides how long it stays up and when it fades. Configure it under plugins.SplashScreen in capacitor.config.ts, call SplashScreen.hide() once your web app has rendered, and generate the images with @capacitor/assets. On Android 12 and later most of the plugin's visual options stop applying to the launch splash, which is where most confusion starts.
Install the plugin
npm install @capacitor/splash-screen
npx cap syncVersion 8.0.2 is the latest tag for the plugin, matching Capacitor 8 (@capacitor/core 8.6.0). Older majors stay on tags like latest-7, so pin the plugin major to your Capacitor major.
capacitor.config options
A typical setup keeps the splash up until the app says it is ready, instead of guessing a duration:
/// <reference types="@capacitor/splash-screen" />
import type { CapacitorConfig } from "@capacitor/cli";
const config: CapacitorConfig = {
appId: "com.example.app",
appName: "Example",
webDir: "dist",
plugins: {
SplashScreen: {
launchAutoHide: false,
launchFadeOutDuration: 300,
backgroundColor: "#0f0f11",
androidScaleType: "CENTER_CROP",
showSpinner: false,
},
},
};
export default config;| Key | Default | What it does |
|---|---|---|
launchShowDuration | 500 | Milliseconds the launch splash stays up when auto hide is on. |
launchAutoHide | true | Hide automatically after launchShowDuration. Set false and call hide() yourself. |
launchFadeOutDuration | 200 | Fade out in ms. Android only, and only with the Android 12 Splash Screen API. |
backgroundColor | none | #RRGGBB or #RRGGBBAA. Not applied on launch with the Android 12 API, or with useDialog. |
androidScaleType | FIT_XY | ImageView scale type for the splash image. Not applied on launch with the Android 12 API. |
androidSplashResourceName | splash | Drawable name to use. Not applied on launch with the Android 12 API. |
showSpinner, spinnerColor | none | Spinner over the splash. Styles via androidSpinnerStyle and iosSpinnerStyle. |
splashFullScreen, splashImmersive | none | Hide the status bar (and nav buttons). Android only, not on the Android 12 launch splash. |
layoutName and useDialog also exist for custom Android layouts.Hiding it from your app
import { SplashScreen } from "@capacitor/splash-screen";
// After your first screen has rendered
await SplashScreen.hide();
// Later, a programmatic splash (for example during a re-sync)
await SplashScreen.show({ autoHide: false });
await SplashScreen.hide({ fadeOutDuration: 200 });show() takes autoHide, showDuration (default 3000), fadeInDuration and fadeOutDuration (both default 200). With launchAutoHide: false the splash stays until you call hide(), so make sure that call runs on every code path, including a failed network request on startup. A missing hide() looks exactly like a frozen app.
Generating the images with @capacitor/assets
@capacitor/assets (4.0.0 on npm) crops and resizes PNG or JPG sources into the iOS, Android and PWA projects. It reads an assets/ or resources/ folder at the project root and has two modes.
| Mode | Files in assets/ | Minimum size |
|---|---|---|
| Easy mode | logo.png (or icon.png), optional logo-dark.png. SVG also accepted. | Not stated; the logo is scaled to 0.2 of the splash by default (--logoSplashScale). |
| Custom mode | icon-only.png, icon-foreground.png, icon-background.png, splash.png, splash-dark.png | Icons 1024x1024. Splash files 2732x2732. |
npm install --save-dev @capacitor/assets
npx @capacitor/assets generate \
--splashBackgroundColor '#0f0f11' \
--splashBackgroundColorDark '#0f0f11' \
--iconBackgroundColor '#0f0f11'The square 2732x2732 requirement matters because of how the native templates draw the splash. The iOS template ships a LaunchScreen.storyboard with one image view set to aspect fill, backed by a 2732x2732 Splash image set. Aspect fill on a square source crops the sides on a phone and the top and bottom on an iPad in landscape, so keep the logo inside the central area of the square.
Where the generator's sizes fit
The Splash Screen Generator exports portrait PNGs at real device sizes, not 2732x2732 squares, so they do not feed @capacitor/assets custom mode. They fit the Android legacy drawables directly. The Capacitor Android template ships splash.png in drawable-port-mdpi through drawable-port-xxxhdpi (960x1600 at xxhdpi), plus landscape versions.
| Folder | Generator export |
|---|---|
res/drawable-port-mdpi/splash.png | mdpi, 360x800 |
res/drawable-port-hdpi/splash.png | hdpi, 540x1200 |
res/drawable-port-xhdpi/splash.png | xhdpi, 720x1600 |
res/drawable-port-xxhdpi/splash.png | xxhdpi, 1080x2400 |
res/drawable-port-xxxhdpi/splash.png | xxxhdpi, 1440x3200 |
SplashScreen.show() and Android 11 and below display. They are not the Android 12+ launch splash.Our exports are 9:20 and the template's placeholders are 3:5. With the plugin's default androidScaleType of FIT_XY, an image whose ratio differs from the screen is stretched. Set CENTER_CROP so it fills the screen and crops instead. For iOS, build your splash on a square canvas for the storyboard, or use easy mode with your logo and the background color you picked in the generator. The splash screen sizes reference lists every export.
Make the splash art for your Capacitor app
Export portrait PNGs at every Android density bucket and iPhone size, plus a GIF preview of the animation.
Android 12 and later
Since Capacitor 4 the launch splash on Android uses the Android 12 Splash Screen API, with androidx.core:core-splashscreen (1.2.0 by default, set by coreSplashScreenVersion in variables.gradle) to backport it to Android 11 and below. The launch theme is AppTheme.NoActionBarLaunch with parent Theme.SplashScreen in android/app/src/main/res/values/styles.xml. Android draws a centered icon on a single color, so your full-screen splash.png does not appear at launch on Android 12+. Android uses the launcher icon by default; set the background and icon in the theme instead:
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="android:background">@drawable/splash</item>
<item name="windowSplashScreenBackground">@color/splash_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
</style>Android's icon rules apply: an icon without an icon background is 288x288 dp and must fit inside a 192 dp circle, and anything outside the circle is masked. You cannot turn this splash off on Android 12+, because it is part of the OS. You can drop the compat library on older versions by changing the parent to AppTheme.NoActionBar, which brings back the full-screen @drawable/splash there.
Common display bugs
- Stretched splash on Android 11 and below or during `show()`. The default
FIT_XYscale type. UseCENTER_CROP. - Logo cut off on iPad. The storyboard image view uses aspect fill. Keep artwork inside the center of the 2732x2732 square.
- White flash between splash and app.
launchAutoHidehid the splash before the web view painted. Set it tofalseand callhide()after your first render. - Splash never goes away.
launchAutoHide: falsewith ahide()call that never runs, often behind an awaited request that threw. - `backgroundColor` ignored on Android 12+. Expected: set
windowSplashScreenBackgroundin the launch theme instead. - Old image after regenerating. Run
npx cap syncand do a clean rebuild, then uninstall the app from the device before testing again.
Related
Frequently asked questions
Why does my Capacitor splash screen show the app icon instead of my image on Android?
Android 12 and later always draw the launch splash through the system Splash Screen API, which shows a centered icon on a solid color. Capacitor also uses the compat library, so older versions behave the same unless you change the launch theme's parent to AppTheme.NoActionBar.
How do I make the Capacitor splash screen stay until my app loads?
Set launchAutoHide to false under plugins.SplashScreen in capacitor.config, then call SplashScreen.hide() from your app once the first screen has rendered.
What size should splash.png be for @capacitor/assets?
In custom mode, assets/splash.png and assets/splash-dark.png must be at least 2732x2732 pixels. In easy mode you supply only a logo and background colors, and the tool builds the splash images for you.
Does @capacitor/assets still support Cordova?
No. Its README says Cordova support was removed as of 1.x, and the tool targets Capacitor's iOS, Android and PWA projects.