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

@fragiola/dockable-react

v0.2.0

Published

Composable, unstyled React primitives for @fragiola/dockable.

Readme

@fragiola/dockable-react

Composable React 19 primitives for Dockable, a headless layout manager for dockable panels: tabs grouped in tabsets, rows and columns with splitters between them, borders, drag and drop to rearrange everything, and popout windows.

Dockable is headless. It ships the behaviour, the accessibility and the primitives (Dockable.Root, Row, TabSet, TabList, Tab, Panel, Splitter, …), and no CSS, no icons, no rendered menus and no text: you style every part with className, style and the data-* attributes it exposes, and every visible word and accessible name comes from you.

Documentation, guides and live examples: https://fragiola.com/dockable.

Install

pnpm add @fragiola/dockable-react

This one package is all a React app installs: it re-exports the whole core (@fragiola/dockable: the model, its types, the commands), so everything is imported from @fragiola/dockable-react. It depends on the core at the exact same version. react and react-dom ^19 are peer dependencies. ESM only.

A minimal layout

import {
    createModel,
    Dockable,
    type LayoutJson,
    type RowNode,
    type TabsetNode,
} from "@fragiola/dockable-react";
import { type ReactNode, useState } from "react";

// what each tab holds: its component and its data
type Types = { tabs: { note: { text: string } } };

const json: LayoutJson<Types> = {
    version: 1,
    root: {
        type: "row",
        children: [
            { type: "tabset", children: [{ component: "note", label: "One", data: { text: "" } }] },
            { type: "tabset", children: [{ component: "note", label: "Two", data: { text: "" } }] },
        ],
    },
};

// you own the recursion: a row's child is a tabset or a nested row
function renderNode(child: TabsetNode<Types> | RowNode<Types>): ReactNode {
    if (child.type === "row") {
        return <Dockable.Row node={child}>{renderNode}</Dockable.Row>;
    }
    return (
        <Dockable.TabSet node={child}>
            <Dockable.TabList<Types> aria-label="Notes">
                {(tab) => <Dockable.Tab node={tab}>{tab.label}</Dockable.Tab>}
            </Dockable.TabList>
            <Dockable.TabSetContent />
        </Dockable.TabSet>
    );
}

export function App() {
    // the model is the source of truth: create it once
    const [model] = useState(() => createModel<Types>(json));
    return (
        <Dockable.Root model={model} style={{ height: "100vh" }}>
            <Dockable.Row<Types>>{renderNode}</Dockable.Row>
            <Dockable.Panels<Types>>
                {(tab) => (
                    <Dockable.Panel node={tab}>
                        <textarea aria-label={tab.label} defaultValue={tab.data.text} />
                    </Dockable.Panel>
                )}
            </Dockable.Panels>
        </Dockable.Root>
    );
}

The splitters, the drag and drop and the keyboard work as is; the look is all yours. Your first layout walks through it step by step.

Stability

Dockable is 0.x: until 1.0, the API may break between minor versions (0.1 to 0.2), and the changelog says what changed and how to update.

Credits

Dockable is derived from FlexLayout by Caplin Systems Ltd (MIT). See LICENSE.