By default the splash screen hides automatically when your app is ready. When the first screen depends on fonts loaded with useFonts or on data fetched at launch, you can take over: keep the splash screen up while those load, then hide it as soon as they are ready. expo-splash-screen also sets how the splash screen fades out when it hides.
Key terms
SplashScreen.preventAutoHideAsync: keeps the native splash screen visible until you hide it explicitly.SplashScreen.hide: hides the native splash screen immediately.SplashScreen.setOptions: configures the default animation the splash screen uses when it hides.
Holding the splash screen from module scope
Install both libraries with npx expo install expo-font expo-splash-screen, then import the splash screen API as a namespace with import * as SplashScreen from 'expo-splash-screen'.
The library supports Android, iOS and tvOS. preventAutoHideAsync() keeps the native splash screen on screen until your code hides it, and it returns a Promise<boolean> that you don't await. Call it in the module's global scope, outside any component or hook. Called inside a component, it might run too late, when the splash screen is already hidden. The default template's src/app/_layout.tsx already makes this call above its root component. Expo Router re-exports a SplashScreen namespace too, but the examples here import from expo-splash-screen directly.
Hiding once the fonts settle
The root layout below holds the splash screen until a custom font loads, using the [loaded, error] pair you already know from useFonts. Watch where each line sits relative to the component.
The effect calls SplashScreen.hide() when loaded || error is true and lists [loaded, error] as its dependencies. Checking error as well means a failed font load still ends the splash screen. Until loaded or error is set, the component renders nothing with if (!loaded && !error) return null;, and the splash screen covers the empty frame because the module-scope call is still holding it. Keep the useEffect above that early return, in the order the layout shows.
hide() returns void and hides the splash screen at once. Make sure there is content to show when you call it, or users may see a blank screen for a moment. In this layout, calling it before the font settles would reveal the null render, which is exactly that blank screen. The goal is to hide the splash screen as soon as possible, so call hide() the moment the first screen can render.
You will also meet hideAsync(). It returns Promise<void> and is kept for backwards compatibility. On Android and iOS it only calls hide(), so the two behave the same and new code can use hide().
Waiting for data instead of fonts
The same shape works for anything the first screen needs, such as API data. Keep an isReady state that turns true when the data arrives, and hide the splash screen in an effect once it does:
tsxuseEffect(() => { if (isReady) { SplashScreen.hide(); } }, [isReady]);
Until isReady is true, the layout returns null, as the font version does.
Fading out with setOptions
setOptions(options) sets the animation the splash screen uses when it hides and returns void. It takes two options:
duration: the length of the fade out in milliseconds, 400 by default.fade: whether to hide with a fade out animation,falseby default. It only applies on iOS.
tsxSplashScreen.setOptions({ duration: 250, fade: true, });
Because fade is false unless you set it, write fade: true whenever you want the fade on iOS. In Expo Go, setOptions logs a warning and does nothing, so it needs a development build or a release build. As with the plugin options, check the final fade in a preview or production build, because a development build includes expo-dev-client, which has its own splash screen. For an animation of your own, start from the with-splash-screen example with npx create-expo-app --example with-splash-screen.
Code Examples
import { useEffect } from 'react';
import { Stack } from 'expo-router';
import { useFonts } from 'expo-font';
import * as SplashScreen from 'expo-splash-screen';
// Called in global scope, outside the component
SplashScreen.preventAutoHideAsync();
export default function RootLayout() {
const [loaded, error] = useFonts({
Lora: require('@/assets/fonts/Lora-Regular.ttf'),
});
useEffect(() => {
if (loaded || error) {
SplashScreen.hide();
}
}, [loaded, error]);
if (!loaded && !error) {
return null;
}
return <Stack />;
}