npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sekizlipenguen/react-native-splash-helper

v0.0.2

Published

A lightweight React Native library to automatically configure splash screens for both Android and iOS platforms. Simplifies the splash screen setup process for React Native developers.

Readme

platforms npm npm

@sekizlipenguen/react-native-splash-helper

A lightweight React Native library to automatically configure splash screens for both Android and iOS platforms. Simplifies the splash screen setup process for developers.

Features

  • Automatic Splash Screen Setup: Configures splash screens for both Android and iOS with minimal setup.
  • Theme Detection: Automatically detects application and activity themes in AndroidManifest.xml.
  • Cross-Platform Support: Works seamlessly on macOS, Linux, and Windows.
  • Customizable: Easily define splash image and background color through a simple configuration.

Installation

Install the library using Yarn or npm:

YARN

yarn add @sekizlipenguen/react-native-splash-helper --dev

NPM

npm install @sekizlipenguen/react-native-splash-helper --save-dev

Note: The xml2js package is included as a dependency and used internally.


Configuration

Configuration Options

| Option | Platform | Type | Description | |-------------------------|----------|----------|------------------------------------------------------------------------| | splashImage | Both | string | Path to the splash image file. | | backgroundColor | Android | string | Background color in HEX format (e.g., #ffffff). |

To configure the splash helper, add a section to your react-native.config.js file:

module.exports = {
  dependencies: {},
  '@sekizlipenguen/react-native-splash-helper': {
    android: {
      splashImage: './assets/splash_image.png' // Path to your splash image
    },
    ios: {
      splashImage: './assets/splash_image.png'  // Path to your splash image
    }
  }
};

Usage

Run the following command to generate the splash screens:

npx @sekizlipenguen/react-native-splash-helper generate-splash

What It Does

This library handles the splash screen during the app's loading phase:

  • iOS: Manages the Launch Screen Storyboard until the app is fully loaded.
  • Android: Manages the Splash Activity and its configuration until React Native initializes.

Once the app has fully loaded and transitions to the App.js, the splash screen is no longer managed by this library. At this point, you can create and display custom screens or animations within your React Native app.

  1. Android:

    • Updates styles.xml to include the android:windowBackground property for detected themes.
    • Updates or creates colors.xml with the specified background color.
    • Generates the drawable resource for the splash screen.
    • Updates the AndroidManifest.xml to ensure consistency in theme configuration.
  2. iOS:

    • Updates the LaunchScreen.storyboard file with the splash image and background color.
    • Creates the necessary image assets in the Images.xcassets directory.

Example

Android Output

  • Updates the following in styles.xml:
    <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
        <item name="android:windowBackground">@drawable/splash_background</item>
    </style>
  • Updates or creates colors.xml:
    <resources>
        <color name="splash_background">#ffffff</color>
    </resources>
  • Creates splash_background.xml in drawable:
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:drawable="@color/splash_background" />
        <item>
            <bitmap android:gravity="fill" android:src="@drawable/splash_image" />
        </item>
    </layer-list>

iOS Output

  • Updates LaunchScreen.storyboard with:
    <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" ...>
        <scene>
            ...
            <view key="view" contentMode="scaleToFill">
                <color key="backgroundColor" systemColor="systemBackgroundColor" />
                <subviews>
                    <imageView contentMode="scaleAspectFill" image="splash_image" ... />
                </subviews>
            </view>
        </scene>
    </document>

Screenshots

Splash Screen Example

Android Splash Screen

Notes

  • Make sure your splash image is available at the specified path.
  • If any required file (e.g., styles.xml, colors.xml) does not exist, it will be created automatically.
  • The script is non-destructive and will not overwrite existing configurations unless necessary.

Contributing

Contributions are welcome! Please submit an issue or pull request on the GitHub repository.


License

MIT © Sekizli Penguen