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

@ayoungh/cmpnnts

v0.1.7

Published

Reusable React UI components and utilities for your design system.

Readme

@ayoungh/cmpnnts

Reusable React UI components and utilities for your design system.

Install

pnpm add @ayoungh/cmpnnts

Consumer setup (Next.js App Router)

  1. Import styles once in your root layout:
import "@ayoungh/cmpnnts/styles.css"
  1. Wrap your app with the design system provider:
import { DesignSystemProvider } from "@ayoungh/cmpnnts"

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body>
        <DesignSystemProvider>{children}</DesignSystemProvider>
      </body>
    </html>
  )
}
  1. Use components anywhere:
import { Button, Card, CardContent, CardHeader, CardTitle } from "@ayoungh/cmpnnts"

export function ExampleCard() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Design System</CardTitle>
      </CardHeader>
      <CardContent>
        <Button>Click me</Button>
      </CardContent>
    </Card>
  )
}

Theme provider options

DesignSystemProvider includes:

  • ThemeProvider (via next-themes)
  • TooltipProvider
  • Sonner toaster (SonnerToaster)

You can disable pieces when needed:

<DesignSystemProvider withToaster={false} withTooltipProvider={false}>
  {children}
</DesignSystemProvider>

You can also use ThemeProvider directly if you only want theming:

import { ThemeProvider } from "@ayoungh/cmpnnts"

<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
  {children}
</ThemeProvider>

Geist components (including Tree)

Geist components are re-exported so you can import them from this package.

import { Tree, GeistProvider, CssBaseline } from "@ayoungh/cmpnnts"

Example:

<GeistProvider>
  <CssBaseline />
  <Tree>
    <Tree.File name="package.json" />
    <Tree.Folder name="components">
      <Tree.File name="button.tsx" />
    </Tree.Folder>
  </Tree>
</GeistProvider>

Tailwind setup (required)

Components use utilities like bg-background, text-foreground, and border-border. Your app's Tailwind theme must define those tokens.

For Tailwind v4, add token mapping in your global CSS (after @import "tailwindcss"):

@theme inline {
  --color-border: hsl(var(--border));
  --color-input: hsl(var(--input));
  --color-ring: hsl(var(--ring));
  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));
  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));
  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));
  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));
  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));
  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));
  --color-popover: hsl(var(--popover));
  --color-popover-foreground: hsl(var(--popover-foreground));
  --color-card: hsl(var(--card));
  --color-card-foreground: hsl(var(--card-foreground));
}

For Tailwind v3, add the equivalent theme.extend.colors mapping in tailwind.config.

Theming and tokens

Base tokens are shipped in @ayoungh/cmpnnts/styles.css (:root and .dark CSS variables).

To brand your system from another repo, override CSS variables in your app after importing package CSS.

  1. In your app layout, import in this order:
import "@ayoungh/cmpnnts/styles.css"
import "./brand-tokens.css"
  1. Create brand-tokens.css and override tokens:
:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --primary: 220 90% 56%;
  --primary-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 220 90% 56%;
  --radius: 0.75rem;
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --primary: 210 40% 98%;
  --primary-foreground: 222.2 47.4% 11.2%;
}
  1. Keep the Tailwind token mapping section above so classes like bg-background and border-border resolve correctly.

  2. Optional multi-brand mode: scope tokens by attribute/class:

[data-brand="acme"] {
  --primary: 220 90% 56%;
}

[data-brand="sunset"] {
  --primary: 12 90% 55%;
}

Then set the brand at runtime, for example on <html data-brand="acme">.

Exports

Primary entrypoint:

  • @ayoungh/cmpnnts for components/utilities/providers

Styles entrypoint:

  • @ayoungh/cmpnnts/styles.css

Components

  • Accordion
  • AccordionItem
  • AccordionTrigger
  • AccordionContent
  • Alert
  • AlertTitle
  • AlertDescription
  • AlertDialog
  • AlertDialogPortal
  • AlertDialogOverlay
  • AlertDialogTrigger
  • AlertDialogContent
  • AlertDialogHeader
  • AlertDialogFooter
  • AlertDialogTitle
  • AlertDialogDescription
  • AlertDialogAction
  • AlertDialogCancel
  • AspectRatio
  • Avatar
  • AvatarImage
  • AvatarFallback
  • Badge
  • Breadcrumb
  • BreadcrumbList
  • BreadcrumbItem
  • BreadcrumbLink
  • BreadcrumbPage
  • BreadcrumbSeparator
  • BreadcrumbEllipsis
  • Button
  • Calendar
  • Card
  • CardHeader
  • CardFooter
  • CardTitle
  • CardDescription
  • CardContent
  • Carousel
  • CarouselContent
  • CarouselItem
  • CarouselPrevious
  • CarouselNext
  • Checkbox
  • Collapsible
  • CollapsibleTrigger
  • CollapsibleContent
  • Command
  • CommandDialog
  • CommandInput
  • CommandList
  • CommandEmpty
  • CommandGroup
  • CommandItem
  • CommandShortcut
  • CommandSeparator
  • ContextMenu
  • ContextMenuTrigger
  • ContextMenuContent
  • ContextMenuItem
  • ContextMenuCheckboxItem
  • ContextMenuRadioItem
  • ContextMenuLabel
  • ContextMenuSeparator
  • ContextMenuShortcut
  • ContextMenuGroup
  • ContextMenuPortal
  • ContextMenuSub
  • ContextMenuSubContent
  • ContextMenuSubTrigger
  • ContextMenuRadioGroup
  • Dialog
  • DialogPortal
  • DialogOverlay
  • DialogClose
  • DialogTrigger
  • DialogContent
  • DialogHeader
  • DialogFooter
  • DialogTitle
  • DialogDescription
  • Drawer
  • DrawerPortal
  • DrawerOverlay
  • DrawerTrigger
  • DrawerClose
  • DrawerContent
  • DrawerHeader
  • DrawerFooter
  • DrawerTitle
  • DrawerDescription
  • DropdownMenu
  • DropdownMenuTrigger
  • DropdownMenuContent
  • DropdownMenuItem
  • DropdownMenuCheckboxItem
  • DropdownMenuRadioItem
  • DropdownMenuLabel
  • DropdownMenuSeparator
  • DropdownMenuShortcut
  • DropdownMenuGroup
  • DropdownMenuPortal
  • DropdownMenuSub
  • DropdownMenuSubContent
  • DropdownMenuSubTrigger
  • DropdownMenuRadioGroup
  • Form
  • FormItem
  • FormLabel
  • FormControl
  • FormDescription
  • FormMessage
  • FormField
  • HoverCard
  • HoverCardTrigger
  • HoverCardContent
  • Input
  • InputOTP
  • InputOTPGroup
  • InputOTPSlot
  • InputOTPSeparator
  • Label
  • Menubar
  • MenubarMenu
  • MenubarTrigger
  • MenubarContent
  • MenubarItem
  • MenubarSeparator
  • MenubarLabel
  • MenubarCheckboxItem
  • MenubarRadioGroup
  • MenubarRadioItem
  • MenubarPortal
  • MenubarSubContent
  • MenubarSubTrigger
  • MenubarGroup
  • MenubarSub
  • MenubarShortcut
  • NavigationMenu
  • NavigationMenuList
  • NavigationMenuItem
  • NavigationMenuContent
  • NavigationMenuTrigger
  • NavigationMenuLink
  • NavigationMenuIndicator
  • NavigationMenuViewport
  • Pagination
  • PaginationContent
  • PaginationEllipsis
  • PaginationItem
  • PaginationLink
  • PaginationNext
  • PaginationPrevious
  • Popover
  • PopoverTrigger
  • PopoverContent
  • Progress
  • RadioGroup
  • RadioGroupItem
  • ResizablePanelGroup
  • ResizablePanel
  • ResizableHandle
  • ScrollArea
  • ScrollBar
  • Select
  • SelectGroup
  • SelectValue
  • SelectTrigger
  • SelectContent
  • SelectLabel
  • SelectItem
  • SelectSeparator
  • SelectScrollUpButton
  • SelectScrollDownButton
  • Separator
  • Sheet
  • SheetPortal
  • SheetOverlay
  • SheetTrigger
  • SheetClose
  • SheetContent
  • SheetHeader
  • SheetFooter
  • SheetTitle
  • SheetDescription
  • Skeleton
  • Slider
  • Switch
  • Table
  • TableHeader
  • TableBody
  • TableFooter
  • TableHead
  • TableRow
  • TableCell
  • TableCaption
  • Tabs
  • TabsList
  • TabsTrigger
  • TabsContent
  • Textarea
  • ToastProvider
  • ToastViewport
  • Toast
  • ToastTitle
  • ToastDescription
  • ToastClose
  • ToastAction
  • Toaster
  • ToastToaster
  • SonnerToaster
  • Tree
  • GeistProvider
  • CssBaseline
  • Toggle
  • ToggleGroup
  • ToggleGroupItem
  • Tooltip
  • TooltipTrigger
  • TooltipContent
  • TooltipProvider

Local development (this repo)

pnpm install
pnpm dev

Preview app runs at http://localhost:3000.

Build the npm package

pnpm build:package

This creates a publishable package in dist/ with:

  • compiled JS
  • type declarations
  • styles.css (for design tokens/base styles)

Publish to npm

  1. Login:
pnpm login
  1. Verify the package content:
pnpm pack:check
  1. Publish:
pnpm publish --access public

Notes

  • Current package name is @ayoungh/cmpnnts (change in package.json if you want a different npm scope/name).
  • The repository still includes the Next.js app for previewing components while developing the design system.