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

@youngonesworks/ui

v1.0.26

Published

A Youngones UI component library

Readme

@youngonesworks/ui

A comprehensive React component library built with Tailwind CSS v4, featuring modular CSS variables and TypeScript support.

Features

  • 🧩 React components built with TypeScript
  • 🎨 Styled with Tailwind CSS v4
  • 📦 Modular CSS exports - Import only what you need
  • 🔤 Font-agnostic design – Works seamlessly with app-level fonts (e.g. Work Sans via Google Fonts)
  • 🎯 CSS Variables & Utilities - Exportable design tokens
  • 🌳 Tree-shakeable - Only import what you need
  • 📝 Full TypeScript support - Type-safe CSS variable helpers
  • Modern build - Rolldown (Rust-based bundler)

Installation

# pnpm
pnpm add @youngonesworks/ui

# npm
npm install @youngonesworks/ui

Peer Dependencies

  • react: ^18 || ^19
  • react-dom: ^18 || ^19
  • next: ^14 || ^15 (for Next.js projects)

Tailwind CSS v4 setup (required for component styles)

Component classes (e.g. KebabMenu title, buttons, layout) are Tailwind utilities. Your app must scan the library’s built output so Tailwind generates those classes.

1. Import the library CSS in your main stylesheet (e.g. app.css or globals.css):

@import "tailwindcss";
@import "@youngonesworks/ui/styles.css";

2. Add the library to Tailwind’s source so utilities used by components are generated. In the same main CSS file, add:

@source "../node_modules/@youngonesworks/ui/dist";

Use the path that resolves to the library from your CSS file (e.g. ../../node_modules/... if your CSS lives under src/).

Example full setup:

/* app.css or src/globals.css */
@import "tailwindcss";
@source "../node_modules/@youngonesworks/ui/dist";
@import "@youngonesworks/ui/globals.css";

Without @source, components like KebabMenu (e.g. the visible title and dropdown styles) will not get their Tailwind styles in the built CSS.

Tailwind CSS v3 (legacy)

If you still use Tailwind v3 with tailwind.config.js, include the library in content:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./src/**/*.{js,jsx,ts,tsx}",
    "./node_modules/@youngonesworks/ui/dist/**/*.{js,jsx,ts,tsx}",
  ],
  theme: { extend: {} },
  plugins: [],
};

Note: use the dist folder, because that is what gets published and where the class names appear.

Usage

🧩 React Components

import { Button } from "@youngonesworks/ui";

function App() {
  return (
    <>
      <Button>Default</Button>
      <Button variant="secondary" size="sm">
        Small Secondary
      </Button>
      <Button variant="outline" size="lg">
        Large Outline
      </Button>
    </>
  );
}

🎨 CSS Variables & Utilities

Import CSS Variables

/* Import in your CSS file */
@import "@youngonesworks/ui/styles/variables.css";
@import "@youngonesworks/ui/styles/utilities.css";

.my-component {
  color: var(--color-primary); /* #10d1bb */
  font-family: var(--font-family-sans); /* App-defined sans font */
  font-size: var(--font-lg-size); /* 1.125rem */
  transition: var(--transition-duration-sidebar);
}

🔤 Next.js Fonts

Setup in Next.js App Router

// app/layout.tsx
// app/layout.tsx
import { Work_Sans } from "next/font/google";
import "@youngonesworks/ui/styles/variables.css";

const workSans = Work_Sans({
  subsets: ["latin"],
  weight: ["300", "400", "500", "600", "700", "900"],
  variable: "--font-family-sans",
});

export default function RootLayout({ children }) {
  return (
    <html lang="en" className={workSans.variable}>
      <body>{children}</body>
    </html>
  );
}

Use Font Utilities

// app/layout.tsx
import { Work_Sans } from "next/font/google";
import "@youngonesworks/ui/styles/variables.css";

const workSans = Work_Sans({
  subsets: ["latin"],
  weight: ["300", "400", "500", "600", "700", "900"],
  variable: "--font-family-sans",
});

export default function RootLayout({ children }) {
  return (
    <html lang="en" className={workSans.variable}>
      <body>{children}</body>
    </html>
  );
}

📦 Available Exports

// Components
import { Button, Card, Input } from "@youngonesworks/ui";

// CSS files (import in CSS/SCSS)
// @import '@youngonesworks/ui/styles/variables.css';
// @import '@youngonesworks/ui/styles/utilities.css';

📊 Available CSS Variables

Colors

  • --color-primary - Primary brand color (#10d1bb)
  • --color-secondary - Secondary brand color
  • --color-background - Background colors
  • --color-foreground - Text colors

Typography

  • --font-family-sans - Application-defined sans font stack (e.g. Work Sans)
  • --font-xs-size to --font-9xl-size - Font sizes (0.75rem - 8rem)
  • --font-xs-line to --font-9xl-line - Line heights

Spacing & Sizing

  • --spacing-* - Consistent spacing scale
  • --sizing-* - Width/height utilities

Transitions & Animations

  • --transition-duration-* - Duration presets
  • Custom animation utilities (.animate-spin-slow, etc.)

Components

Button

<Button
  variant="primary" // 'primary' | 'secondary' | 'outline'
  size="md" // 'sm' | 'md' | 'lg'
  onClick={() => console.log("clicked")}
>
  Click me
</Button>

🚀 Development

Setup

git clone https://github.com/youngonesworks/ui.git
cd ui
pnpm install

Available Scripts

# Development
pnpm dev          # Start Storybook development server
pnpm watch        # Watch and build library

# Building
pnpm build        # Build library for production
pnpm build-storybook  # Build Storybook for deployment

# Publishing
pnpm buildAndPublish  # Build and publish to npm

# Code Quality
pnpm lint         # ESLint
pnpm lint:fix     # Auto-fix ESLint issues
pnpm format       # Prettier formatting
pnpm test         # Run Jest tests

Project Structure

src/
├── components/     # React components
├── styles/         # Modular CSS files
    ├── variables.css   # CSS custom properties
    ├── utilities.css   # Utility classes
    └── fonts.css       # Font-face declarations
├── theme/          # TypeScript theme utilities
    ├── variables.ts    # CSS variable helpers
    ├── fonts.ts        # Next.js font configuration
    └── index.ts        # Theme exports
└── index.ts        # Main entry point

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository and create a feature branch
  2. Follow conventional commits spec for commit messages
  3. Add tests for new components or utilities
  4. Update documentation including README and Storybook stories
  5. Ensure all checks pass (lint, format, test, build)
  6. Submit a PR with a clear description

CSS Variables

When adding new CSS variables:

  1. Add them to src/styles/variables.css
  2. Document them in this README

License

ISC License - see LICENSE file for details.


Built with ❤️ by YoungOnes | Website | GitHub