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

@aria-ui/cli

v0.1.9

Published

CLI tool for aria-ui

Readme

@aria-ui/cli

A CLI and programmatic API that generates typed framework wrappers for @aria-ui/elements (or any custom-element library built with @aria-ui/core).

@aria-ui/elements ships native Web Components. The CLI reads your component source files with ts-morph, extracts each component's props and events, and emits idiomatic wrapper components for the framework of your choice.

Supported frameworks

  • React
  • Preact
  • Solid
  • Vue
  • Svelte

Installation

npm install --save-dev @aria-ui/cli
# or
pnpm add -D @aria-ui/cli

typescript is an optional peer dependency — install it if it isn't already in your project.

CLI usage

npx aria-ui build \
  --tsconfig ./tsconfig.json \
  --entry node_modules/@aria-ui/elements/src/listbox/index.ts \
  --output ./src/components/listbox \
  --framework react \
  --import-source @aria-ui/elements/listbox

Flags

| Flag | Required | Description | | ----------------- | -------- | -------------------------------------------------------------------------------------------------------------- | | --tsconfig | yes | Path to a tsconfig.json that can resolve the entry file. | | --entry | yes | Path to the entry file that re-exports the components you want wrapped. | | --output | yes | Output directory for the generated wrapper files. | | --framework | yes | One of react, preact, solid, vue, svelte. | | --import-source | yes | Module specifier the generated code uses to import the underlying elements (e.g. @aria-ui/elements/listbox). | | --prefix | no | Custom-element tag prefix. Defaults to aria-ui. |

Programmatic API

import { build } from '@aria-ui/cli'

await build({
  tsconfig: './tsconfig.json',
  entry: './node_modules/@aria-ui/elements/src/listbox/index.ts',
  output: './src/components/listbox',
  framework: 'react',
  importSource: '@aria-ui/elements/listbox',
  prefix: 'aria-ui',
})

Wrapper extensions

You can customize how wrappers are generated by passing wrapperExtensions. Each extension can match specific components and inject imports, setup statements, render-prop expressions, or framework-specific overrides.

import { build, propFallback, type WrapperExtension } from '@aria-ui/cli'

const idFallback: WrapperExtension = propFallback({
  prop: 'id',
  frameworks: {
    react: { importSource: 'react', importName: 'useId', callExpression: 'useId()' },
  },
})

await build({
  // ...
  wrapperExtensions: [idFallback],
})

A WrapperExtension looks like:

interface WrapperExtension {
  name: string
  match?: (context: WrapperMatchContext) => boolean
  apply(context: WrapperApplyContext): void
}

The WrapperApplyContext exposes helpers such as addImport, addSetupStatement, setRenderPropsExpression, setReactPropOverride, and addSvelteScriptStatement. The built-in propFallback extension is a good reference for how to write your own.

What it generates

Given a component like ListboxRoot with the props value, multiple, etc. and the events valueChange and valuesChange, the React generator emits a wrapper that:

  • Maps each prop to the right HTML attribute or JS property based on its declared type.
  • Converts each DOM event into a React-style onValueChange callback whose argument is the original event (so event.detail is preserved).
  • Forwards ref to the underlying custom element.
  • Re-exports the prop and event types from the source package.

The generated files are formatted with oxfmt so they look at home in your project.

License

MIT