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

@statusas/react

v0.3.0

Published

Status badge for React: shows whether your services are up, straight from your statusas.lt status page.

Readme

Statusas status widget for React

A badge that says whether your services are up, read straight from your statusas.lt status page. It is a React Server Component: it fetches on the server, ships no client JavaScript, and degrades to "Unknown" rather than throwing if the API cannot be reached.

Install

npm install @statusas/react
pnpm add @statusas/react
yarn add @statusas/react
bun add @statusas/react

React 18 or 19.

Use it

import { StatusWidget } from "@statusas/react";

export default function Page() {
  return <StatusWidget slug="your-page-slug" />;
}

The slug is your status page's subdomain — your-page-slug.statusas.lt. Pass href to point the badge somewhere else, for instance your own domain:

<StatusWidget slug="your-page-slug" href="https://status.your-company.com" />

Language

The label defaults to English. Pass locale for one of the eight languages a status page serves — lt, en, fr, de, tr, hi, ko, ja:

<StatusWidget slug="your-page-slug" locale="lt" />
// Veikia

The badge sets lang on its own element, so a screen reader announces the label in the right voice even when the surrounding page is in another language. An unrecognised locale falls back to English rather than throwing.

Styles

With Tailwind v4, tell it to scan the package:

/* app/globals.css */
@import "tailwindcss";
@source "../node_modules/@statusas/react/dist";

With Tailwind v3, extend content:

// tailwind.config.js
module.exports = {
  content: [
    "./app/**/*.{tsx,ts,mdx,md}",
    "./node_modules/@statusas/react/dist/**/*.{js,mjs}",
  ],
};

Not using Tailwind? Import the compiled stylesheet once:

// app/layout.tsx
import "@statusas/react/styles.css";

Style it yourself

getStatus is the badge without the markup.

import { getStatus } from "@statusas/react";

async function CustomStatusWidget() {
  const { status } = await getStatus("your-page-slug");
  return <div>{/* your own markup */}</div>;
}
type Status =
  | "operational"
  | "degraded_performance"
  | "partial_outage"
  | "major_outage"
  | "under_maintenance"
  | "incident"
  | "unknown";

It calls https://api.statusas.lt/public/status/:slug, which needs no credentials. Self-hosting? Set STATUSAS_API_URL, or pass a base URL as the second argument.

More

MIT licensed. Built by LOYALTY LT, MB.