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

@serversideup/project-switcher-bar

v0.0.5

Published

ServerSideUp branded toolbar with product navigation for documentation sites

Readme

@serversideup/project-switcher-bar

ServerSideUp branded toolbar with product navigation for documentation sites. Displays the ServerSideUp logo, a "Browse Products" dropdown with Premium/Books/Open Source sections, navigation links, and social icons.

Installation

yarn add @serversideup/project-switcher-bar

Tailwind v4 Source Detection

Since the component lives in node_modules, Tailwind v4 needs to be told to scan it for utility classes. Add a @source directive to your main CSS file:

@import "tailwindcss";
@source "../node_modules/@serversideup/project-switcher-bar/src";

Usage

<script setup>
import { ProjectSwitcherBar } from '@serversideup/project-switcher-bar'
</script>

<template>
  <ProjectSwitcherBar />
</template>

The component ships pre-compiled — no special build configuration needed in your project.

Migrating from ServerSideUp.vue

If your project has a local ServerSideUp.vue component (the old hardcoded toolbar), follow these steps:

1. Install the package

yarn add @serversideup/project-switcher-bar

2. Add the Tailwind @source directive

In your main CSS file (e.g. app/assets/css/main.css), add:

@source "../node_modules/@serversideup/project-switcher-bar/src";

3. Update app.vue

Replace the old component with an explicit import:

  <script setup>
+ import { ProjectSwitcherBar } from '@serversideup/project-switcher-bar'
  </script>

  <template>
    <UApp>
      <NuxtLoadingIndicator />
-     <ServerSideUp />
+     <ProjectSwitcherBar />
      <AppHeader />

Note: If your project uses the Global/ directory convention (e.g. Spin docs), replace <GlobalServerSideUp /> instead.

4. Delete the old component

Remove the old file from whichever location it lives in your project:

# docker-php, amplitudejs, etc.
rm app/components/ServerSideUp.vue

# spin (uses Global/ subdirectory)
rm app/components/Global/ServerSideUp.vue

5. Remove @vueuse/nuxt (optional)

The old ServerSideUp.vue used onClickOutside from VueUse. This package uses a native document.addEventListener instead, so if onClickOutside was the only reason you had @vueuse/nuxt installed, you can remove it:

yarn remove @vueuse/nuxt

Then remove '@vueuse/nuxt' from the modules array in nuxt.config.ts.

How It Works

  • The component is pre-compiled to plain JS via Vite library mode (dist/index.mjs) — works in any Vue/Nuxt project without needing to transpile .vue files
  • Product and open source data is baked into src/data.json (auto-updated by CI from the main serversideup.net content)
  • Logos are embedded as base64 data URIs — no external assets needed
  • Navigation links and social icons are hardcoded in the component
  • Uses <a> tags (not <NuxtLink>) so it works in any Vue project
  • The src/ directory is included for Tailwind v4 class scanning via @source

Automatic Updates with Dependabot

To automatically receive PRs when a new version is published, add .github/dependabot.yml to your sub-project:

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/docs"
    schedule:
      interval: "daily"
    allow:
      - dependency-name: "@serversideup/project-switcher-bar"

Note: Change directory to match the location of your package.json (e.g. "/" if it's at the repo root, "/docs" if it's in a docs subdirectory).

The allow key restricts Dependabot to only open PRs for this package. Without it, Dependabot would propose updates for all your npm dependencies.

Data Updates

The src/data.json file is automatically updated by GitLab CI when products or open source projects change on serversideup.net. A GitHub Action then rebuilds dist/, bumps the version, and publishes to npm automatically.

Development

yarn install
yarn dev

Opens a Vite dev server with a preview page rendering the component.

Building

yarn build

Compiles the Vue component to dist/index.mjs. This is done automatically by the GitHub Action when src/ changes on main.

License

MIT