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

@nebula-lab/headless

v1.0.0

Published

Behavior-only, ARIA-complete compound components — no styling opinions. Renamed @nebula-lab/headless -> @nebula-lab/styleless -> back to @nebula-lab/headless; the project owner's confirmed 5-tier model treats headless (this package) and styleless (a disti

Readme

@nebula-lab/headless

Behavior-only, ARIA-complete compound components. No styling opinions — that's @nebula-lab/react-ui's job, built on top of this package and @nebula-lab/styleless. (This package was renamed @nebula-lab/headless@nebula-lab/styleless → back to @nebula-lab/headless: the project owner confirmed a 5-tier model where headless — this package — and styleless — a distinct layer — are two different things, not one renamed package. See AGENTS.md's "Layer placement" section.)

Installation

npm install @nebula-lab/headless
# or
yarn add @nebula-lab/headless
# or
pnpm add @nebula-lab/headless
# or
bun add @nebula-lab/headless

Peer dependencies: react ^19.0.0, react-dom ^19.0.0. Works with any of the above package managers — pick whichever your project already uses.

Module format: ESM only (no CommonJS build). Works out of the box with any bundler (Vite, Next.js, Webpack 5+, esbuild, Parcel) or native Node.js ESM. A plain CommonJS require('@nebula-lab/headless') is not supported and throws ERR_REQUIRE_ESM — use import (or dynamic import() from a CJS file) instead.

TypeScript / JavaScript: Ships hand-written .d.ts types alongside the JS output, but nothing requires TypeScript — plain JavaScript works identically. TypeScript users get full autocomplete/type-checking for free; JavaScript users just don't see the type annotations.

What's here

Every component below follows its WAI-ARIA APG pattern (roving-tabindex, correct roles/states, full keyboard support) and exposes state via data-state/data-orientation/data-disabled attributes rather than requiring you to track it yourself.

OverlaysDialog, AlertDialog, Drawer, Popover, HoverCard, Tooltip

MenusMenu, DropdownMenu, ContextMenu, Menubar, NavigationMenu, Command

DisclosureAccordion, Collapsible

Selection controlsCheckbox, CheckboxGroup, RadioGroup, Switch, Toggle, ToggleGroup, Select, Listbox, Combobox, Autocomplete, ColorPicker, Rating

Text/numeric inputNumberInput, OtpInput, Slider, FileUpload, Field (label/control/description/error wiring)

NavigationTabs, Breadcrumb, Pagination, Stepper

FeedbackToast, Progress, Spinner, Skeleton

DataTree, TreeView

See AGENTS.md's status table for the authoritative, currently-maintained inventory as new components land.

  • Tabs / TabList / Tab / TabPanel — WAI-ARIA Tabs pattern: roving-tabindex arrow-key navigation (Left/Right or Up/Down depending on orientation, plus Home/End), automatic or manual activation mode, controlled or uncontrolled value. Nested Tabs instances don't collide (scoped context via @nebula-lab/primitives).
  • Checkbox — tri-state (checked / unchecked / indeterminate), hidden-native-input technique so it participates in real <form>/FormData submission and fires genuine click/input/change events.
  • Switch — same hidden-native-input pattern as Checkbox, WAI-ARIA Switch role.
  • RadioGroup / RadioGroupItem — WAI-ARIA Radio Group pattern, built on @nebula-lab/primitives' RovingFocusGroup/FocusItem rather than hand-rolling roving-tabindex again.
  • Accordion / AccordionItem / AccordionHeader / AccordionTrigger / AccordionContent — WAI-ARIA Accordion pattern, type="single" (with collapsible) or type="multiple", arrow-key navigation between triggers via RovingFocusGroup/FocusItem, panel wrapped in @nebula-lab/primitives' Presence so consumers can animate expand/collapse off data-state instead of it unmounting instantly.
  • Dialog / DialogTrigger / DialogPortal / DialogOverlay / DialogContent / DialogTitle / DialogDescription / DialogClose — WAI-ARIA Dialog (Modal) pattern. DialogContent composes @nebula-lab/primitives' Presence + DismissibleLayer (Escape/outside-click) + FocusScope (trapped when modal, the root's default) via asChild chaining, so it's one real DOM node despite the layered behavior.
  • Popover / PopoverTrigger / PopoverPortal / PopoverContent / PopoverClose — the non-modal sibling of Dialog: anchor-positioned (via @nebula-lab/primitives' Popper, composed into Popover's own scope so a single __scopePopover threads through both), role="dialog" without aria-modal, FocusScope with trapped={false} (focus moves in on open and restores to the trigger on close, but Tab isn't cycled), dismissed via Escape/outside-click same as Dialog. PopoverTrigger toggles open/closed on click, unlike DialogTrigger which only opens.

Import

import { Tabs, TabList, Tab, TabPanel } from '@nebula-lab/headless';
// or per-component subpath
import { Tabs, TabList, Tab, TabPanel } from '@nebula-lab/headless/tabs';
import { Checkbox } from '@nebula-lab/headless/checkbox';
import { Switch } from '@nebula-lab/headless/switch';
import { RadioGroup, RadioGroupItem } from '@nebula-lab/headless/radio-group';
import {
  Accordion,
  AccordionItem,
  AccordionHeader,
  AccordionTrigger,
  AccordionContent,
} from '@nebula-lab/headless/accordion';
import {
  Dialog,
  DialogTrigger,
  DialogPortal,
  DialogOverlay,
  DialogContent,
  DialogTitle,
  DialogDescription,
  DialogClose,
} from '@nebula-lab/headless/dialog';
import {
  Popover,
  PopoverTrigger,
  PopoverPortal,
  PopoverContent,
  PopoverClose,
} from '@nebula-lab/headless/popover';
<Tabs defaultValue="account">
  <TabList>
    <Tab value="account">Account</Tab>
    <Tab value="password">Password</Tab>
  </TabList>
  <TabPanel value="account">...</TabPanel>
  <TabPanel value="password">...</TabPanel>
</Tabs>

<Accordion type="single" collapsible defaultValue="item-1">
  <AccordionItem value="item-1">
    <AccordionHeader>
      <AccordionTrigger>What is nebula?</AccordionTrigger>
    </AccordionHeader>
    <AccordionContent>A composable React UI platform.</AccordionContent>
  </AccordionItem>
</Accordion>

<Dialog>
  <DialogTrigger>Delete item</DialogTrigger>
  <DialogPortal>
    <DialogOverlay />
    <DialogContent>
      <DialogTitle>Delete item?</DialogTitle>
      <DialogDescription>This can&apos;t be undone.</DialogDescription>
      <DialogClose>Cancel</DialogClose>
    </DialogContent>
  </DialogPortal>
</Dialog>

<Popover>
  <PopoverTrigger>Filters</PopoverTrigger>
  <PopoverPortal>
    <PopoverContent side="bottom" align="start" sideOffset={4}>
      <p>Filter options.</p>
      <PopoverClose>Done</PopoverClose>
    </PopoverContent>
  </PopoverPortal>
</Popover>

API reference

Every component here ships with a live Storybook entry (controls, source, interaction tests) — that's the authoritative API reference, not this README: https://tripathirajan.github.io/nebula/

Contributing

See the monorepo's CONTRIBUTING.md.

License

MIT