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

@textui/core

v0.5.0

Published

Graph-mounted terminal UI runtime - store, registries, renderer, host primitives

Readme

@textui/core

npm license

The runtime: a reactive store, typed registries, a cell-diffing renderer, hooks, and the four host primitives. Everything else in TextUI sits on this.

npm install @textui/core

The one idea

JSX compiles to data. <Row gap={1}/> and { component: 'Row', gap: 1 } are the same value, and the runtime mounts either. A screen can be written in TypeScript, loaded from JSON, generated, edited or sent over a wire without the runtime changing.

import { h, renderToString } from '@textui/core';

console.log(renderToString(
  h('box', { margin: 1, border: 'single' }, h('text', { content: 'hello' })),
  { width: 30 },
));

Capitalized spellings of the primitives exist for JSX - Box, Text, Canvas are the strings themselves, so <Box/> and <box/> produce the identical node.

What is in here, and what is not

The four primitives - box, text, canvas, spacer - are here because the layout engine and the painter are the things that reason about them. The eighty-seven components built out of them are @textui/widgets, a separate package that depends on this one.

That split is not tidiness. An imported component travels on its own node, so a screen written in JSX resolves without a registry at all:

import { Badge } from '@textui/widgets';

renderToString(h(Badge, { label: 'ok' }), { width: 20 });  // registry empty

The registry is for the case JSX cannot cover - a component named by a string, in JSON, a template renderer, or an extension. render takes those through its components option.

The parts

| | | |---|---| | Store | One reactive tree addressed by path. A prop can be { path: '$/x' } and the runtime resolves it and redraws when it changes | | Registries | Components, commands, keybindings, themes, shells, surfaces, resources - typed, and disposable | | Renderer | Diffs cells rather than redrawing frames. renderOnce and renderToString draw one frame with no terminal at all | | Hooks | useState, useEffect, useStore, useFocus, useInterval and thirty more - module imports, not a second argument | | Layers | Dialogs, palettes, toasts and tooltips are entries on five planes, so focus trapping and dismissal are decided once |

Runtime

No dependencies, and no node: imports - this package never touches a filesystem or a process. It runs on Node 22+ and on Bun, and would run in a browser against a virtual terminal.

Documentation

https://softov.github.io/textui/


Part of TextUI - documentation - getting started

@textui/kit one install · @textui/core the runtime · @textui/widgets the catalog · @textui/terminal adapters and input · @textui/testing the harness · @textui/cli the CLI