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

@daivymoralesofi/ofiui

v0.1.0

Published

OFI Design System — React + Tailwind components for Ofi Services AI Agents. Inspired by the Supabase Design System.

Downloads

229

Readme

OfiUI

A React component library for Ofi Services — built on shadcn/ui, Radix UI, and Tailwind CSS. Gives every Ofi AI agent builder a consistent, premium frontend without writing bespoke UI code.

npm


Installation

npm install @daivymoralesofi/ofiui
# or
pnpm add @daivymoralesofi/ofiui
# or
yarn add @daivymoralesofi/ofiui

react and react-dom are peer dependencies (^18 or ^19).


Setup

1 — Tailwind CSS

OfiUI requires Tailwind CSS. If your project doesn't have it yet:

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

2 — Tailwind preset

OfiUI ships a preset that contains the design tokens, color scales, and plugins the components rely on. Extend your tailwind.config.js:

// tailwind.config.js
import ofiuiPreset from "@daivymoralesofi/ofiui/tailwind.preset"

export default {
  presets: [ofiuiPreset],
  darkMode: ["class"],
  content: [
    "./index.html",
    "./src/**/*.{ts,tsx}",
    // Required — prevents Tailwind from purging OfiUI's class names
    "./node_modules/@daivymoralesofi/ofiui/dist/**/*.{js,mjs}",
  ],
}

3 — Stylesheet

Import the prebuilt stylesheet once at your app entry point (main.tsx, _app.tsx, layout.tsx, etc.) before your own global styles:

import "@daivymoralesofi/ofiui/styles.css"

This file contains the CSS-variable theme tokens (--background, --foreground, --primary, --radius, …) for both light and dark mode.

4 — Dark mode (optional)

Dark mode is class-based. Add the dark class to <html> or any ancestor:

<html class="dark">

Or toggle it dynamically:

document.documentElement.classList.toggle("dark")

Usage

import { Button } from "@daivymoralesofi/ofiui"
import { Plus } from "lucide-react"

export function CreateButton() {
  return (
    <Button type="primary" icon={<Plus />}>
      Create agent
    </Button>
  )
}

All primitives, patterns, and icons are exported from the package root. Use autocomplete from @daivymoralesofi/ofiui to discover what's available.

The cn() class-merging helper is also exported:

import { cn } from "@daivymoralesofi/ofiui"

<div className={cn("px-3 py-2", isActive && "bg-accent", className)} />

What's included

Primitives (ui/)

Vendored shadcn/ui components built on Radix UI — Avatar, Badge, Button, Calendar, Card, Checkbox, Input, Label, Popover, Progress, Radio Group, Select, Separator, Sheet, Switch, Table, Textarea, and more.

Patterns (ui-patterns/)

Higher-level compositions:

  • Charts — compound-component chart toolkit on top of Recharts (ChartCard, ChartLine, ChartBar, ChartMetric, LogsBarChart, …)
  • Forms — React Hook Form + Zod field arrays and item layouts
  • Admonition — callout/banner with semantic variants
  • Multi-select — Radix Popover + Command-style multi-selector
  • Metric card — stat display with trend indicators
  • Data inputs — higher-order form inputs

Icons (icons/)

Custom SVG icons via the createIcon factory, plus lucide-react for generic glyphs.


Button API

Button is the most expressive component in the system.

| Prop | Values | Default | |---------|--------|---------| | type | primary default secondary outline dashed link text danger warning | primary | | size | tiny small default medium large huge | default | | block | true / false | false |

Additional props: icon, iconRight, loading, loadingCentered, asChild, htmlType.

<Button type="primary" size="medium" icon={<Plus />}>Create</Button>
<Button type="outline" loading>Saving…</Button>
<Button asChild type="link"><a href="/docs">Read the docs</a></Button>

Troubleshooting

Components render without styles — make sure you imported @daivymoralesofi/ofiui/styles.css and added ./node_modules/@daivymoralesofi/ofiui/dist/**/*.{js,mjs} to your Tailwind content array.

Dark colors don't apply — confirm the dark class is on <html> and that tailwind.config.js has darkMode: ["class"].

TypeScript can't find the module — ensure moduleResolution is "bundler" or "node16" in tsconfig.json so it resolves the package exports map.


Local development

Prerequisites

  • Node.js 18+
  • npm

Install

npm install

Scripts

| Command | What it does | |---------|-------------| | npm run dev | Starts the Vite dev server with HMR | | npm run build | Type-checks and builds the docs site | | npm run build:lib | Builds the publishable library bundle to dist/ | | npm run preview | Serves the production build locally |

Publish

prepublishOnly runs build:lib automatically. The published files are dist/, tailwind.preset.js, and README.md.

Project structure

src/
├── components/
│   ├── ui/              # Primitives (vendored shadcn/ui)
│   ├── ui-patterns/     # Compositions
│   └── icons/           # Custom SVG icons
├── docs/                # Living docs app (dev reference)
├── lib/
│   ├── utils.ts         # cn() helper
│   └── format.ts
├── App.tsx              # Docs app entry
├── LandingPage.tsx      # Marketing page
└── index.css            # Tailwind layers + CSS-variable tokens

Path alias @/*src/*. Always import via @/....

Adding a new component

  1. Pick the layer: primitive (ui/), composition (ui-patterns/), or icon (icons/).
  2. For shadcn primitives: npx shadcn@latest add <name>, then align with system conventions.
  3. Use CVA for variant-driven styling; reference colors via CSS-variable utilities (bg-primary, text-foreground).
  4. Forward ref, set displayName, spread className last through cn().
  5. Add a usage example to the docs app and run npm run build:lib to confirm.

License

Private — Ofi Services internal use.