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

@trycompai/ui

v1.3.2

Published

UI component library for Comp AI

Readme

@trycompai/ui

A modern, accessible UI component library built with React, TypeScript, and Tailwind CSS. Based on shadcn/ui components with custom enhancements.

Installation

# Using npm
npm install @trycompai/ui

# Using yarn
yarn add @trycompai/ui

# Using bun
bun add @trycompai/ui

Setup

1. Import the CSS

Add the UI library's global CSS to your app's entry point:

// In your app's root layout or _app.tsx
import '@trycompai/ui/globals.css';

2. Configure Tailwind

The UI library provides a Tailwind preset. Update your tailwind.config.ts:

import uiPreset from '@trycompai/ui/tailwind-preset';
import type { Config } from 'tailwindcss';

export default {
  presets: [uiPreset],
  content: [
    './src/**/*.{ts,tsx}',
    // Include the UI library in content paths
    './node_modules/@trycompai/ui/dist/**/*.js',
  ],
  // Your custom config...
} satisfies Config;

3. Add CSS Variables

Ensure your app includes the required CSS variables for theming. These should be in your global CSS:

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 10% 3.9%;
    --radius: 0.5rem;
  }

  .dark {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    /* ... add dark mode variables */
  }
}

Usage

Basic Import

import { Button, Card, Input } from '@trycompai/ui';

export function MyComponent() {
  return (
    <Card>
      <Input placeholder="Enter your name" />
      <Button>Submit</Button>
    </Card>
  );
}

Import Specific Components

For better tree-shaking, import components individually:

import { Button } from '@trycompai/ui/button';
import { Card } from '@trycompai/ui/card';

Using Hooks

import { useMediaQuery } from '@trycompai/ui/hooks';

export function ResponsiveComponent() {
  const isMobile = useMediaQuery('(max-width: 768px)');

  return isMobile ? <MobileView /> : <DesktopView />;
}

Using Utilities

import { cn } from '@trycompai/ui/utils';

export function Component({ className }: { className?: string }) {
  return <div className={cn('flex items-center', className)}>Content</div>;
}

Available Components

  • Layout: Card, Separator, ScrollArea, ResizablePanels
  • Forms: Button, Input, Label, Textarea, Select, Checkbox, RadioGroup, Switch, Slider
  • Feedback: Alert, Toast, Progress, Spinner, Skeleton
  • Overlay: Dialog, Sheet, Popover, Tooltip, DropdownMenu, ContextMenu
  • Navigation: Tabs, NavigationMenu, Breadcrumb
  • Data Display: Table, Badge, Avatar
  • Typography: Text components with built-in styles
  • Advanced: Calendar, DatePicker, Command, Combobox, Editor

TypeScript Support

This library is built with TypeScript and includes comprehensive type definitions. All components are fully typed with proper prop interfaces.

Next.js Compatibility

All components are marked with "use client" where necessary and are fully compatible with Next.js App Router.

License

MIT