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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ios-pwa-splash-screen

v1.4.0

Published

Add iOS PWA splash screens to your progressive web app with ease.

Readme

ios-pwa-splash-screen

Add iOS and iPadOS PWA splash screens generated from your app icons.

Demo

Features

  • Creates portrait and landscape <link rel="apple-touch-startup-image"> tags
  • Supports separate light and dark mode icons
  • Detects iOS and iPadOS by default
  • Replaces previously generated tags when run again
  • Includes ESM, CommonJS, UMD, and TypeScript declarations

Install

npm install ios-pwa-splash-screen

Basic usage

Define a setup function:

// src/pwa-splash.ts
import { generateIosPwaSplash } from 'ios-pwa-splash-screen';

export function setupIosSplashScreen() {
  generateIosPwaSplash({
    icon: { url: '/icons/icon-light.png', backgroundColor: '#fff' },
    iconDark: { url: '/icons/icon-dark.png', backgroundColor: '#000' },
  }).catch(console.error);
}

Run it from a browser entry point:

import { setupIosSplashScreen } from './pwa-splash';

setupIosSplashScreen();

Local icon URLs need no extra configuration. For an icon hosted on another origin, that server must allow CORS and crossOrigin: 'anonymous' must be set. Set ensureIos: false when testing on a non-iOS device.

Framework examples

These examples use setupIosSplashScreen from above.

React and Next.js

'use client'; // Required by the Next.js App Router.

import { useEffect } from 'react';
import { setupIosSplashScreen } from './pwa-splash';

export function PwaSplashSetup() {
  useEffect(() => setupIosSplashScreen(), []);

  return null;
}

Render <PwaSplashSetup /> in the root component or layout.

Vue and Nuxt

Call it from the root App.vue or layout:

<script setup lang="ts">
import { onMounted } from 'vue';
import { setupIosSplashScreen } from './pwa-splash';

onMounted(setupIosSplashScreen);
</script>

Svelte and SvelteKit

Call it from the root component or +layout.svelte:

<script lang="ts">
  import { onMount } from 'svelte';
  import { setupIosSplashScreen } from './pwa-splash';

  onMount(setupIosSplashScreen);
</script>

Angular

import { afterNextRender, Component } from '@angular/core';
import { setupIosSplashScreen } from './pwa-splash';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
})
export class AppComponent {
  constructor() {
    afterNextRender(setupIosSplashScreen);
  }
}

Astro

Call it from a <script> in the root layout:

<script>
  import { setupIosSplashScreen } from './pwa-splash';

  setupIosSplashScreen();
</script>

CDN usage

The examples use unpkg. For jsDelivr, replace https://unpkg.com/ with https://cdn.jsdelivr.net/npm/.

ES module

<script type="module">
  import { generateIosPwaSplash } from 'https://unpkg.com/ios-pwa-splash-screen/dist/index.js';

  generateIosPwaSplash({
    icon: { url: '/icon-light.png', backgroundColor: '#fff' },
    iconDark: { url: '/icon-dark.png', backgroundColor: '#000' },
  }).catch(console.error);
</script>

UMD

<script src="https://unpkg.com/ios-pwa-splash-screen/dist/index.umd.js"></script>

<script>
  window.IosPwaSplashScreen.generateIosPwaSplash({
    icon: { url: '/icon-light.png', backgroundColor: '#fff' },
    iconDark: { url: '/icon-dark.png', backgroundColor: '#000' },
  }).catch(console.error);
</script>

Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | icon | IconConfig | required | Light-mode icon configuration | | iconDark | IconConfig | None | Dark-mode icon configuration | | ensureIos | boolean | true | Only run on iOS and iPadOS | | ensureMetaTags | boolean | true | Ensure the Apple web-app-capable meta tag exists | | crossOrigin | 'anonymous' \| 'use-credentials' | None | Set img.crossOrigin when loading icons | | imageType | 'image/png' \| 'image/jpeg' | 'image/png' | Generated image format | | quality | number | 1 | JPEG quality from 0 to 1 | | fetchPriority | 'low' \| 'high' \| 'auto' | 'high' | Icon image fetch priority | | cleanup | boolean | true | Remove previously generated startup-image tags | | customAttribute | string | 'data-pwa-splash-generated' | Attribute used to identify generated tags |

IconConfig

| Property | Type | Default | Description | | --- | --- | --- | --- | | url | string | required | Square icon URL | | backgroundColor | string | required | Splash screen background color | | margin | number | 25 | Icon margin as a percentage of the shorter screen edge |

License

MIT © VastBlast