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

@supalosa/osrs-react-ui

v0.1.3

Published

Composable Old School RuneScape-style React interface components

Readme

@supalosa/osrs-react-ui

Composable, unconnected React components for Old School RuneScape-style user interfaces. This package does not depend on osrs-sdk and can be connected to any application state or game engine.

Credits

Original Old School RuneScape visual design, sprites, and fonts are by Jagex Ltd. The React component implementation is by Supalosa. This is an unofficial project and is not endorsed by or affiliated with Jagex.

The library currently includes resizable modern and resizable classic layout shells, minimap chrome, side panels, interface tabs, display settings, and an interactive 28-slot inventory. Fixed classic can reuse the same low-level components when its layout shell is implemented.

Development

Requires Node.js 20.20 or newer.

npm ci
npm run storybook

Run all local checks with:

npm run check

Installation

npm install @supalosa/osrs-react-ui
import { RuneScapeButton, RuneScapePanel } from "@supalosa/osrs-react-ui";
import "@supalosa/osrs-react-ui/styles.css";

The library build owns its resource-pack images. Applications do not need to copy them into a public directory.

Resizable modern

The layout components are controlled and intentionally contain no game-engine state. Supply the world/minimap content and keep the selected tab in the host:

import { useState } from "react";
import {
  Inventory,
  interfaceTabIcons,
  ResizableModernLayout,
  ResizableModernMinimap,
  ResizableModernSidePanel,
} from "@supalosa/osrs-react-ui";

const tabs = [
  { id: "inventory", label: "Inventory", icon: interfaceTabIcons.inventory },
  { id: "options", label: "Settings", icon: interfaceTabIcons.options },
];

export function GameInterface() {
  const [activeTab, setActiveTab] = useState<string | null>("inventory");

  return (
    <ResizableModernLayout
      world={<canvas />}
      minimap={<ResizableModernMinimap>{/* minimap renderer */}</ResizableModernMinimap>}
      sidePanel={
        <ResizableModernSidePanel
          activeTab={activeTab}
          onActiveTabChange={setActiveTab}
          tabs={tabs}
        >
          {(tab) => tab === "inventory" ? <Inventory /> : <Settings />}
        </ResizableModernSidePanel>
      }
    />
  );
}

Selecting the active tab again collapses the panel. Storybook's Interfaces/Resizable Modern stories include an opacity-controlled overlay of the supplied reference screenshots for pixel alignment work.

Both resizable layout shells accept stretchPercent, from 0 at native size to 100 at twice the native size. Minimap, chat, and side-panel chrome scale from their respective screen anchors.

Inventory

Inventory state remains owned by the consuming application. Supply up to 28 items in slot order and handle clicks or completed drag movements as needed:

<Inventory
  items={items}
  onItemLeftClick={(slot) => useItem(slot)}
  onItemMoved={(fromSlot, toSlot) => reorderItem(fromSlot, toSlot)}
/>

The component provides the press and drag visuals, including stack quantities, but does not decide the resulting inventory state.

Equipment

The equipment tab reports clicks on both occupied and empty slots through onSlotLeftClick. The callback receives the slot name (for example, "weapon"); the consuming application can use its equipment map to decide whether to equip or remove an item. Empty slots become buttons when the callback is supplied.

Bundler setup

Vite

No additional asset configuration is expected. Import the package stylesheet once from the application entry point.

Webpack

The application must process imported CSS. A typical Webpack rule uses style-loader and css-loader:

{
  test: /\.css$/,
  use: ["style-loader", "css-loader"],
}

Publishing

The package is configured for public npm publication with provenance. Licensing and attribution for bundled third-party visual assets must be resolved before the first published release. Once resolved, verify and inspect the package with:

npm run check
npm pack --dry-run