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

@aerem/ui

v0.5.0

Published

Cross-platform UI components for web (shadcn) and React Native (CLI).

Readme

@aerem/ui

Cross-platform UI components for Aerem apps. One import, same API on web (shadcn-based) and React Native (CLI; iOS + Android).

Install

npm install @aerem/ui
# or
yarn add @aerem/ui

Peer dependencies

Install whichever apply to your target platform:

| Platform | Peer deps | |----------|-----------| | Web | react, react-dom, radix-ui | | RN CLI | react, react-native |

The package already ships its own clsx, tailwind-merge, and class-variance-authority as regular dependencies.

Usage

The import statement is the same on both platforms. Metro picks .native.js automatically; web bundlers see the default file.

import { Button } from '@aerem/ui';

export function Example() {
  return (
    <Button variant="outline" size="sm" onPress={() => console.log('hi')}>
      Click me
    </Button>
  );
}

On web, the click handler is onClick. On native, it's onPress. All other props (variant, size, disabled, children) are identical.

Available components

The barrel (import { ... } from "@aerem/ui") exports the lightweight components — anything that resolves with only react, react-dom, radix-ui, and lucide-react:

  • LayoutCard, Item, ItemGroup, Separator, AspectRatio, Field, FieldGroup, Table, Avatar
  • InputsInput, InputOTP, Textarea, Label, Checkbox, RadioGroup, Switch, Toggle, Slider, Select, InputGroup
  • ButtonsButton, ButtonGroup, Badge
  • OverlaysDialog, Sheet, Popover, HoverCard, Tooltip, DropdownMenu, Menubar, Portal
  • FeedbackAlert, Progress, Skeleton, Spinner, FullScreenLoader
  • NavigationAccordion, Tabs, Pagination
  • FileFileUpload

Subpath-only components (heavy peer deps)

Some components have larger or stricter peer deps. They're shipped behind explicit subpath imports so consumers that don't use them never have to install those peers — and TypeScript projects on older versions don't get their declarations parsed.

| Subpath | Peer dep | Notes | |---|---|---| | @aerem/ui/combobox | @base-ui/react (>=1.0) | Requires TS 5+ because @base-ui/[email protected] ships TS 5.0+ syntax in its .d.ts files. | | @aerem/ui/command | cmdk (>=1.1) | | | @aerem/ui/drawer | vaul (>=1.1) | | | @aerem/ui/carousel | embla-carousel-react (>=8.0) | | | @aerem/ui/form | react-hook-form (>=7.40) | | | @aerem/ui/sonner | sonner (>=1.5) | | | @aerem/ui/stepper | @radix-ui/react-direction, @radix-ui/react-slot | |

// Lightweight — anywhere
import { Button, Table, TableHeader, Dialog } from "@aerem/ui";

// Heavy — only the file that uses them pays the peer-dep cost
import { Combobox, ComboboxInput, ComboboxContent } from "@aerem/ui/combobox";
import { Drawer, DrawerContent } from "@aerem/ui/drawer";
import { Form, FormField } from "@aerem/ui/form";

Module resolution compatibility

Subpath imports work under all TypeScript moduleResolution settings (classic node, node16, nodenext, bundler) and back to TypeScript 4.x. The package ships:

  • package.json#exports — used by modern bundlers (Webpack 5+, Vite, esbuild, Turbopack) and TS 4.7+ with node16/nodenext/bundler.
  • package.json#typesVersions — picked up by TypeScript 3.1+.
  • Top-level proxy files (combobox.js, combobox.d.ts, lib/cn.js, etc.) — used as a fallback by classic moduleResolution: "node" and older Webpack.

You should not need to change your tsconfig.json to consume @aerem/ui.

Web setup (Tailwind)

The web Button uses Tailwind utility classes. Add the package to your Tailwind content glob so the classes get picked up:

// tailwind.config.ts
export default {
  content: [
    './app/**/*.{ts,tsx}',
    './node_modules/@aerem/ui/dist/**/*.js',
  ],
  // ...
};

You also need the shadcn CSS variables (--primary, --secondary, --muted, --destructive, --border, etc.) defined in your globals.css. If you already have a shadcn-style theme set up, you're done — or import one of the bundled themes:

/* Tailwind v4 (OKLCH, direct var() resolution) — the Aerem "Luma" green theme */
@import "@aerem/ui/styles/luma.css";

/* Tailwind v3 (HSL triples for hsl(var(--token))) */
@import "@aerem/ui/styles/theme.css";

The Luma theme ships light + dark palettes, the Poppins / Inter / IBM Plex Mono font stacks, the radius ladder and shadow scale.

One-time passcode (InputOTP)

A dependency-free, cross-platform segmented OTP input (auto-advance, backspace-to-previous, paste distribution):

import { InputOTP } from "@aerem/ui";

<InputOTP length={6} onComplete={(code) => verify(code)} />

React Native setup

Metro's default resolver handles the .native.js precedence — no extra config required. Just install and import.

If you're using npm/yarn with hoisting and you see "Invalid hook call" or "Cannot read property of null" errors, your bundler is loading a duplicate React. Force-dedupe shared modules from your metro.config.js:

// metro.config.js
const path = require('path');

module.exports = {
  resolver: {
    resolveRequest: (context, moduleName, platform) => {
      const head = moduleName.startsWith('@')
        ? moduleName.split('/').slice(0, 2).join('/')
        : moduleName.split('/')[0];
      if (['react', 'react-native'].includes(head)) {
        return context.resolveRequest(
          { ...context, originModulePath: path.join(__dirname, 'package.json') },
          moduleName,
          platform
        );
      }
      return context.resolveRequest(context, moduleName, platform);
    },
  },
};

Versioning

This package follows semver. While < 1.0.0, minor versions may include breaking changes.

License

UNLICENSED — internal Aerem use only.