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

@moraby/app-launcher

v2.0.17

Published

A Google-style app launcher component for React/Next.js applications

Readme

@moraby/app-launcher

A Google-style app launcher component for React/Next.js applications.

Installation

npm install @moraby/app-launcher
# or
yarn add @moraby/app-launcher

Usage

React / Next.js

Import and use the component as usual:

import { AppLauncher } from '@moraby/app-launcher';
import '@moraby/app-launcher/styles.css';

function MyApp() {
  return <AppLauncher configUrl="/apps.json" />;
}

HTML / Vanilla JavaScript (Web Component)

You can use the bundled Web Component version which includes all dependencies (React/ReactDOM).

Option 1: Using via CDN (No Build Step)

<!-- Load the script (includes React + AppLauncher) -->
<script src="https://unpkg.com/@moraby/app-launcher/dist/app-launcher-element.global.js"></script>
<!-- Load styles -->
<link rel="stylesheet" href="https://unpkg.com/@moraby/app-launcher/dist/index.css" />

<!-- Use the component -->
<app-launcher
  default-apps='[{"id":"1","name":"Dashboard","url":"/","icon":"MdDashboard","color":"#4285F4"}]'
  class-name="my-launcher"
></app-launcher>

<script>
  // You can also interact with it via JS
  const launcher = document.querySelector('app-launcher');
</script>

Option 2: From NPM

<script src="./node_modules/@moraby/app-launcher/dist/app-launcher-element.global.js"></script>
<link rel="stylesheet" href="./node_modules/@moraby/app-launcher/dist/index.css" />

Attributes

  • default-apps: JSON string defining the apps to show.
  • class-name: Custom class name for the wrapper.

Quick Start (Zero-Config)

Use the smart component that handles local storage and settings automatically:

import { LocalAppLauncher } from '@moraby/app-launcher';
import '@moraby/app-launcher/styles.css';

function Header() {
  return (
    <header>
      <h1>My App</h1>
      <LocalAppLauncher />
    </header>
  );
}

This will automatically:

  1. Show a Settings button in the footer
  2. Save custom apps to browser's LocalStorage
  3. Allow users to add/edit/delete apps immediately

Custom Implementation (Advanced)

If you want full control over the state or to load from a remote URL:

With Configuration URL

import { AppLauncher } from '@moraby/app-launcher';
import '@moraby/app-launcher/styles.css';

function Header() {
  return (
    <header>
      <h1>My App</h1>
      <AppLauncher configUrl="https://example.com/apps.json" />
    </header>
  );
}

With Direct Apps Array

import { AppLauncher, AppItem } from '@moraby/app-launcher';
import '@moraby/app-launcher/styles.css';

const apps: AppItem[] = [
  {
    id: 'dashboard',
    name: 'Dashboard',
    url: '/dashboard',
    icon: 'MdDashboard',
    color: '#4285F4',
  },
  {
    id: 'settings',
    name: 'Settings',
    url: '/settings',
    icon: 'FaCog',
    color: '#5f6368',
  },
];

function Header() {
  return (
    <header>
      <AppLauncher apps={apps} />
    </header>
  );
}

With Settings UI (Custom User Apps)

The AppLauncher can now intelligently handle custom user applications and automatically merge them with your default configuration. Simply add the allowCustomApps prop along with a storageKey:

import { AppLauncher } from '@moraby/app-launcher';
import '@moraby/app-launcher/styles.css';

function Header() {
  return (
    <header>
      <AppLauncher
        configUrl="https://example.com/apps.json"
        storageKey="my-user-apps-storage-key"
        allowCustomApps={true}
      />
    </header>
  );
}

This setup will automatically:

  1. Fetch default applications from configUrl.
  2. Inject a "Settings" button in the App Launcher dropdown footer.
  3. Show the built-in Settings modal allowing users to intuitively add, edit, export, and delete custom apps.
  4. Merge default apps with user-defined apps intrinsically.
  5. Persist the user's custom preferences safely in localStorage securely!

Modal Rendering & CSS Isolation

The AppSettings modal renders using a React Portal directly attached to document.body.

  • Placement & Clipping: This prevents the modal from being clipped by host application styles such as overflow: hidden or complex z-index stacking contexts.
  • Client-Side Only: In Next.js App Router, ensure the component (or its parent wrapper) is a Client Component ('use client') since document.body is required.
  • CSS Isolation: The launcher utilizes targeted CSS resets (all: revert, explicit box-sizing) to protect its buttons and SVG icons from host application global styles (e.g., global button {} or svg {} styles bleeding into the component).

Configuration JSON Format

Export your configuration from the admin app and host it as a JSON file:

{
  "version": "1.0",
  "exportedAt": "2024-01-15T10:00:00.000Z",
  "apps": [
    {
      "id": "my-app",
      "name": "My App",
      "url": "https://myapp.example.com",
      "icon": "FaRocket",
      "color": "#4285F4",
      "description": "My awesome app"
    }
  ]
}

Props

| Prop | Type | Description | | ------------------ | ------------------------ | ------------------------------------------------------------------ | | configUrl | string | URL to fetch default configuration from (JSON or API) | | apps | AppItem[] | Direct array of default apps to display | | className | string | Custom class name for the container | | onAppClick | (app: AppItem) => void | Custom click handler | | storageKey | string | Optional localStorage key to save custom apps alongside defaults | | allowCustomApps | boolean | If true, intrinsically shows the Settings UI to manage user apps | | renderFooter | () => ReactNode | Optional explicitly rendered footer inside the dropdown |

Icons

Built-in Icons (react-icons)

Use the icon name as a string:

{ "icon": "FaRocket" }

Custom Icons (URLs)

You can also use your own icons from URLs or public folder:

// From Next.js public folder
{ "icon": "/icons/my-icon.svg" }

// From external URL
{ "icon": "https://cdn.example.com/icon.png" }

Example with custom icon:

{
  "id": "my-app",
  "name": "My App",
  "url": "https://myapp.com",
  "icon": "/motorcycle-icon.svg",
  "color": "transparent"
}

Available Built-in Icons

The package includes 50+ icons from react-icons. Use any of these names:

Business: FaBriefcase, IoBusinessSharp, MdWork, FaGraduationCap

Security: MdOutlineSecurity, FaLock, FaKey, AiOutlineSecurityScan

Communication: FaEnvelope, MdEmail, FaBell

Media: FaYoutube, FaMusic, FaCamera, FaImage, FaGamepad

Productivity: FaCalendarAlt, FaClipboard, FaCalculator, FaFolder, FaFile, FaBookmark, FaTable, FaNewspaper

Navigation: FaMapMarkerAlt, FaGlobe, FaHome

Development: FaCode, FaTerminal, FaDatabase, FaPuzzlePiece

Analytics: FaChartBar, MdDashboard, MdAnalytics

General: FaRocket, FaUser, FaCog, FaHeart, FaStar, IoApps

License

MIT