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

@peers-app/peers-ui

v0.20.6

Published

React components and hooks for building [Peers](https://peers.app) package UIs.

Readme

@peers-app/peers-ui

React components and hooks for building Peers package UIs.

What is Peers?

Peers is a local-first personal computing platform. Your data lives on your devices, syncs peer-to-peer, and is end-to-end encrypted — no servers in the middle. You own your data and your identity. Build apps with the SDK or use AI coding tools to create them; either way, the platform handles sync, encryption, and persistence automatically.

What this package provides

React Hooks

Hooks that bridge @peers-app/peers-sdk observables to React 18 with concurrent rendering support.

| Hook | Purpose | |------|---------| | useObservable | Subscribe to an observable or computed; returns [value, setter] | | useObservableState | Create a component-local observable that persists across renders | | usePromise | Resolve a promise in a component with an optional initial value | | useSubscription | Run a side-effect whenever an observable changes | | useOnScreen | IntersectionObserver hook for visibility detection |

Rich Text

  • MarkdownEditor — Lexical-based rich text editor with @mention support, toolbar, and markdown serialization
  • MarkdownWithMentions — Render markdown with resolved @user and $tool mentions

Layout

  • RootLayoutHost — The single component a client mounts. Owns bootstrapping (user gate, context init, route loading), the always-available command palette, and the welcome modal, then renders the selected root layout body. TabsLayoutApp is a backwards-compatible alias for it.
  • Root layout system — Swappable top-level layouts. getRootLayouts() / getRootLayout(id) expose the static registry, selectedRootLayoutId (per-device pvar) holds the choice, setRootLayout(id) changes it, and <LayoutPicker /> is the Settings UI. The default tabs layout is TabsLayoutInternal.
  • TabsLayoutInternal — The tabs UI body (tab strip + active tab content); the default root layout. Pass fillContainer to size it to its parent instead of the viewport (used when embedding it in another layout).
  • Tabs + Console layout (tabs-with-console) — Splits the tab UI and the Operator Console into two real, resizable panels (dockable bottom/left/right) rather than an overlay. Selectable via <LayoutPicker />.
  • Full-screen layout (fullscreen) — Shows one screen at a time with no tab strip; navigation is via the always-mounted command palette (Cmd/Ctrl+K) plus a Home button. While active it enables setSingleTabMode(true) so opening an app replaces the current screen instead of accumulating tabs (non-destructive — tabs from other layouts are left untouched).
  • OperatorConsolePanel — The presentational console chrome (header toolbar + body) that fills its container; the host layout owns sizing, the resize divider, the collapsed strip, and placement. Toggle the console with Ctrl+` while on the Tabs + Console layout.
  • SortableList — Drag-and-drop list powered by SortableJS
  • InverseLazyList — Bottom-anchored lazy-loading list for chat-style UIs
  • Tabs / ScreenTabBody — Tab strip and content container

Communication

  • VoiceIndicator — Visual indicator for active voice sessions
  • VoicePlayback — Headless component that plays browser-side voice TTS output

Tab Management

| Export | Purpose | |--------|---------| | goToTabPath | Navigate to a path within the Peers tab system | | activeTabId | Observable of the currently active tab ID | | activeTabs | Observable of all open tabs | | closeCurrentTab | Close the active tab | | updateActiveTabTitle | Set the title of the active tab | | TabState | Tab state management class | | mainContentPath | Hash-synced route observable |

Peer Dependencies

{
  "@peers-app/peers-sdk": "^0.18.8",
  "bootstrap": "^5.3.3",
  "react": "^18.0.0",
  "react-dom": "^18.0.0"
}

Quick Start

npm install @peers-app/peers-ui

The fastest way to build a Peers package with a UI is to start from the template:

peers-package-template — scaffold, build, and install a custom package into the Peers runtime.

Package UI bundles receive PeersUI as a webpack external, so you can import hooks and components without bundling them into your package.

Links

  • peers.app — try Peers in your browser or download the desktop app
  • Documentation — architecture, package development, and API reference
  • GitHub — source repositories and package template

License

MIT