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

rn-cn-ui

v1.0.8

Published

A high-quality, open-source UI library for React Native, inspired by shadcn/ui.

Downloads

874

Readme

rn-cn-ui

A high-quality, open-source UI library for React Native, inspired by shadcn/ui. This is a CLI tool that copies the component code into your project, allowing you to customize it fully.

Prerequisites

  1. React Native project (Expo or CLI).
  2. NativeWind v4 configured.

Important: Install Dependencies

NativeWind v4 requires react-native-reanimated. Ensure you have installed it and its peer dependencies:

npm install nativewind react-native-reanimated react-native-safe-area-context react-native-svg

Configure Babel

Add react-native-reanimated/plugin to your babel.config.js. It must be listed last.

module.exports = function(api) {
  api.cache(true);
  return {
    presets: [
      ["babel-preset-expo", { jsxImportSource: "nativewind" }],
      "nativewind/babel",
    ],
    plugins: [
      "react-native-reanimated/plugin",
    ],
  };
};

Note: If you are using Expo, use babel-preset-expo instead of module:metro-react-native-babel-preset.

Setup

Run the init command to set up the base styles and utilities:

npx rn-cn-ui init

This will create:

  • src/global.css (Base styles and theme variables)
  • src/lib/utils.ts (Utility for class merging)

Important: Import global.css in your root file (e.g., App.tsx or app/_layout.tsx):

import "./src/global.css";

Usage

You do not install this library as a dependency. Instead, you use the CLI to add components to your project.

Adding a Component

Run the following command to add a component (e.g., button) to your project:

npx rn-cn-ui add button

This will:

  1. Download button.tsx to your src/components/ui/ directory.
  2. Install necessary dependencies (like class-variance-authority, clsx, tailwind-merge).

Using the Component

Once added, import the component from your local directory:

import { Button } from "./src/components/ui/button"

export default function App() {
  return (
    <Button label="Click me" onPress={() => console.log("Pressed")} />
  )
}

Available Components

You can add any of the following components:

  • accordion
  • alert
  • aspect-ratio
  • avatar
  • badge
  • button
  • card
  • checkbox
  • dialog
  • input
  • label
  • progress
  • radio-group
  • select
  • separator
  • skeleton
  • spinner
  • switch
  • tabs
  • text
  • textarea
  • toggle
  • toggle-group

Configuration

Ensure you have nativewind and tailwindcss configured in your project.

Add the following to your tailwind.config.js:

module.exports = {
  // ...
  presets: [require("nativewind/preset")],
  // ...
}