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

@tangerine-ui/core

v1.0.3

Published

Lightweight, animated React components with excellent tree-shaking

Readme

Tangerine UI (@tangerine-ui/core)

Lightweight, animated React components built with Motion, CVA, and Tailwind-style utility classes. Subpath exports keep bundles tree-shakeable.

Requirements

  • Node.js 18+
  • React 18 or 19
  • Tailwind CSS 3.4+ or 4.x (components rely on utility classes; your build must scan this package—see below)

Installation

npm install @tangerine-ui/core

Your app must already include React 18 or 19 and Tailwind CSS 3.4+ or 4.x (see setup below). Motion, Radix Slot, and CVA are bundled as library dependencies.

Tailwind CSS (required for styles)

Components use Tailwind utility classes (bg-tui-primary, etc.) backed by CSS variables. You need both:

  1. Theme CSS — default tokens (import once in your global CSS)
  2. Tailwind preset — so tui-* utilities are generated and library classes are not purged

Theme (shadcn-style — CSS only, no React provider)

In globals.cssTailwind first, then the library import:

@tailwind base;
@tailwind components;
@tailwind utilities;

@import "@tangerine-ui/core/styles";

CSS does not allow @import after other rules, so use one of the helpers below to inline tokens at that position.

Vite (recommended — required for Vite apps: theme inlining + React dedupe so hooks work):

// vite.config.ts
import { createRequire } from "node:module";
import tui from "@tangerine-ui/core/vite";

const require = createRequire(import.meta.url);
// or: import tui from "@tangerine-ui/core/vite" if your bundler resolves the CJS export

export default defineConfig({
  plugins: [
    tui(), // before @tailwindcss/vite / react()
    /* tailwindcss(), react(), etc. */
  ],
});

Without this plugin, Vite may pre-bundle @tangerine-ui/core with a second copy of React and you will get Invalid hook call errors.

Keep PostCSS for Tailwind only (tailwindcss, autoprefixer). Do not add a Vite resolve.alias for @tangerine-ui/core/styles — that makes Vite resolve @import natively and triggers order warnings.

PostCSS (Next.js, Webpack, etc.):

// postcss.config.js
const tuiStyles = require("@tangerine-ui/core/postcss");

module.exports = {
  plugins: [tuiStyles(), require("tailwindcss"), require("autoprefixer")],
};

Alternative syntax (no @import, same result): @tui styles; after @tailwind.

Your overrides go after the import:

@layer base {
  :root {
    --tui-primary: 234 88 12;
    --tui-primary-hover: 194 65 12;
    --tui-ring: 234 88 12;
  }
}

/* Dark mode: add class="dark" on <html> — do not @apply dark (not a utility) */
.dark {
  --tui-primary: 251 146 60;
}

Use darkMode: "class" in Tailwind and add class="dark" to <html> when needed. Copy theme.example.css from the package as a starting point.

Values are RGB channels (e.g. 234 88 12, not #ea580c) so opacity modifiers work: bg-tui-primary/10.

Tailwind v3 (tailwind.config.js)

Use the package preset so content points at the built files under node_modules:

/** @type {import('tailwindcss').Config} */
module.exports = {
  presets: [require("@tangerine-ui/core/tailwind-preset")],
  content: ["./src/**/*.{js,ts,jsx,tsx}"],
  theme: {
    extend: {},
  },
  plugins: [],
};

Merge the preset with your own content paths (your app files) as shown.

Tailwind v4 (CSS-first)

In your main CSS entry, register the package output as a source so Tailwind discovers classes:

@import "tailwindcss";
@source "../node_modules/@tangerine-ui/core/dist";

Adjust the relative path to match your project layout (or use a path alias your bundler resolves).

Monorepos and linked packages

If you npm link or use a workspace path instead of node_modules, keep the same idea: point Tailwind at @tangerine-ui/core/dist/**/*.{js,mjs} so all generated class strings are visible to the compiler.

Usage

Prefer subpath imports for smaller bundles:

import { Button } from "@tangerine-ui/core/button";
import { ButtonGroup } from "@tangerine-ui/core/button-group";
import { Input } from "@tangerine-ui/core/input";
import { cn } from "@tangerine-ui/core/utils";

Barrel import (convenience, may pull more code):

import { Button, Input, cn } from "@tangerine-ui/core";

Next.js (App Router)

The package is built with a "use client" banner. Import UI components from Client Components, or from files that already use "use client".

TanStack Start

TanStack Start is Vite-based — use @tangerine-ui/core/vite, link global CSS in __root.tsx, and the Tailwind v3 preset. Full walkthrough: docs/tanstack-start.md.

Documentation

| Guide | Description | | ----- | ----------- | | docs/button.md | Button advanced features (motion, memo, layout, long press) | | docs/tanstack-start.md | TanStack Start integration | | docs/README.md | Documentation index |

Package exports

| Subpath | Description | | --------------------- | ------------------------------ | | @tangerine-ui/core | Barrel export | | .../button | Button | | .../button-group | ButtonGroup | | .../input | Input | | .../utils | cn and hooks | | .../styles | Default theme tokens (@import "@tangerine-ui/core/styles") | | .../postcss | PostCSS plugin — inline @import / @tui styles after @tailwind | | .../vite | Vite plugin — inline before Vite resolves @import (no dev warnings) | | .../styles.css | Alias of .../styles (deprecated) | | .../tailwind-preset | Tailwind v3 preset (see above) |

Development (this repo)

Preview components locally (Vite app under playground/, imports from src/—no separate project):

npm install
npm run dev

Library build and checks:

npm run build          # tsup → dist/ (publishable package)
npm run dev:lib        # tsup --watch
npm run type-check
npm run lint
npm test

License

MIT—see LICENSE.