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

@dayos/core

v0.2.2

Published

A windowed desktop for React, with no opinion on styling or routing.

Readme

@dayos/core

A desktop with draggable windows for React: icons, windows you can move, resize and maximize, and a focus stack.

React only — no dependency on Next or on any router. It brings no styles of its own: the only CSS it sets is structural (the desktop is relative + overflow: hidden, the window is a flex column), and everything else is yours.

npm install @dayos/core

Usage

import {
  Desktop,
  DesktopApp,
  DesktopIcon,
  Window,
  WindowContent,
  WindowHeader,
  WindowName,
} from "@dayos/core";

<Desktop className="h-dvh">
  <DesktopApp id="notes">
    <DesktopIcon>Notes</DesktopIcon>
    <Window>
      <WindowHeader>
        <WindowName>Notes</WindowName>
      </WindowHeader>
      <WindowContent>Hello</WindowContent>
    </Window>
  </DesktopApp>
</Desktop>;

Double click on an icon opens its window (Enter and Space work too). Drag the WindowHeader to move the window, its edges to resize it.

Components

| | | | --- | --- | | Desktop | The container. Owns the open windows and their stacking order. | | DesktopApp | One app: an icon plus a window, tied together by an id. | | DesktopIcon, DesktopIconText | What opens the window. | | Window | The window frame. Portals into the desktop once it's mounted. | | WindowHeader, WindowName | The title bar, which is also the drag handle. | | WindowContent | The scrollable body. | | WindowActions, WindowAction | The control group and a generic button. | | WindowExpand, WindowClose | Maximize/restore and close. |

Hooks: useDesktop, useDesktopApp, useOptionalDesktopApp.

Composition

Every component takes className and style, and a render prop that swaps out the element it emits while keeping the behavior:

<DesktopIcon render={<Link href="/notes" />}>Notes</DesktopIcon>

Your handlers run before the built-in ones and can cancel them with preventDefault().

Controlling the desktop

Desktop works uncontrolled (defaultOpenWindows) or controlled (openWindows + onOpenWindowsChange), so window state can be persisted or driven from a dock. DesktopApp takes the same pair per window (defaultOpen, open + onOpenChange).

Server rendering

A window that is open during the server render lands in the HTML with its content inside, without react-rnd and with its geometry in CSS — sized and positioned to match exactly where it will sit once mounted, so there's no jump on hydration.

Only Desktop's defaultOpenWindows seeds that: DesktopApp's defaultOpen runs in an effect, so it opens the window on the client only.

Routing

The core knows nothing about URLs. To give each window a route on the Next App Router, add @dayos/next.

License

MIT