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

@hiai-gg/hiai-ui

v0.1.1

Published

![npm version](https://img.shields.io/npm/v/@hiai-gg/hiai-ui?logo=npm) ![npm downloads](https://img.shields.io/npm/dw/@hiai-gg/hiai-ui?logo=npm) ![license](https://img.shields.io/github/license/HiAi-gg/hiai-ui) ![PRs welcome](https://img.shields.io/bad

Downloads

3,204

Readme

@hiai-gg/hiai-ui

npm version npm downloads license PRs welcome

Why @hiai-gg/hiai-ui

  • One source of truth for design tokens across the HiAi ecosystem
  • 22 composites (AdminSidebar, ChatWidget, DatePicker, ConfirmDialog, ScrollToTop, SearchBar, LiveIndicator, DocumentTitle…)
  • 14 shadcn-svelte primitive categories (Button, Card, Select, Checkbox, RadioGroup…) with deep-path imports
  • Dark mode built-in via .dark class; observe theme via .theme-observe
  • Zero-config consumption — just import tokens.css and you're good

The canonical UI package for the HiAi ecosystem. Design reference — **hiai-docs (oklch, shadcn-svelte new-york / slate). Source-only (no compilation): consumers import the source, which their Vite + Tailwind v4 builds.

See the project documentation for more details.

Layers

| Layer | Location | Import | |---|---|---| | Tokens | src/styles/tokens.css | @import "@hiai-gg/hiai-ui/styles/tokens.css"; | | Primitives (shadcn) | src/components/ui/* | import { Button } from "@hiai-gg/hiai-ui/components/ui/button"; | | Composites | src/components/* | import { AdminSidebar, StatsCard } from "@hiai-gg/hiai-ui"; | | Stores / lib | src/stores, src/lib | import { authStore, cn } from "@hiai-gg/hiai-ui"; |

Primitives are deep-path only (not in main barrel) to avoid pulling bits-ui/lucide on SSR when unnecessary.

How to connect (contract — enforced by every hiai project)

  1. Add dependency:
    // package.json
    "dependencies": { "@hiai-gg/hiai-ui": "workspace:*" }
  2. Import tokens in root app.css (after Tailwind):
    @import "tailwindcss";
    @import "@hiai-gg/hiai-ui/styles/tokens.css";
  3. Let Tailwind v4 scan the package classes — in app.css:
    @source "../../../packages/hiai-ui/src";
    (path — relative to the file; adjust for project depth).
  4. Use components from @hiai-gg/hiai-ui / @hiai-gg/hiai-ui/components/ui/*.
  5. Remove local duplicates of components and tokens.
  6. Theme: .dark class on <html> (toggle via ThemeToggle); for observe — .theme-observe.

Token canon

tokens.css — exact extraction from hiai-docs/frontend/src/app.css. Change design → edit there first, then sync here. Layers within the file:

| Layer | Content | |---|---| | :root / .dark | canon docs: --background/foreground/card/popover/primary/secondary/muted/accent/destructive/border/input/ring/radius, app-tokens (--color-bg/surface), --highlight-default, --hljs-* | | semantic add-on | --primary-hover, --success, --warning, --info, --violet (+-foreground) — additive, not instead of docs | | .theme-observe | dark-first slate variant for hiai-observe | | @theme | mapping tokens to Tailwind v4 (bg-primary, text-muted-foreground, rounded-lg…) + scale --radius-{sm,md,lg,xl} | | base | document (html/body, ::selection, .skip-link, date-inputs), .metric-* (StatsCard) |

Brand accent: light #20b2aa, dark #9932cc.

Checks

bun run check   # svelte-kit sync && svelte-check — package gate (0 errors)

Notes

  • AdminHeader/AdminSidebar reference the SvelteKit runtime virtual $app/state (only page.url.pathname for active item highlighting). Types are declared ambient in src/app.d.ts; implementation is provided by the consuming SvelteKit app. Decoupling via currentPath prop — candidate for future refactor.

New Components (Synced from Consumer)

SiteHeader (Auth Slots)

Now SiteHeaderConfig supports Svelte 5 snippets authSlot and mobileAuthSlot for custom user menus, and nav has been made optional:

<script lang="ts">
  import { SiteHeader } from "@hiai-gg/hiai-ui";
</script>

<SiteHeader config={{
  logo: { alt: "My App" }
}} authSlot={myAuthSnippet} />

{#snippet myAuthSnippet()}
  <button>Log in</button>
{/snippet}

EmptyState

Supports optional link action via actionHref (renders an <a> tag with button styling):

<EmptyState
  title="No Documents"
  description="Create your first document to get started."
  actionLabel="Create Document"
  actionHref="/documents/new"
/>

SiteFooter

A brand new marketing footer component:

<SiteFooter config={{
  brand: { name: "HiAi", tagline: "Smart Agent Scaffolding" },
  columns: [
    { title: "Product", links: [{ label: "Features", href: "/features" }] }
  ],
  copyright: "© 2026 HiAi"
}} />

Skeleton / SkeletonText

Primitives for loading states:

<script lang="ts">
  import { Skeleton, SkeletonText } from '@hiai-gg/hiai-ui/components/ui/skeleton/index';
</script>

<!-- Custom block skeleton -->
<Skeleton class="h-4 w-64" />

<!-- Paragraph helper -->
<SkeletonText lines={3} />

Sonner (Toasts)

Toast notifications using svelte-sonner:

<!-- Mount once in your root layout: -->
<script lang="ts">
  import { Sonner } from '@hiai-gg/hiai-ui/components/ui/sonner/index';
</script>

<Sonner />

<!-- Trigger toast anywhere in your app: -->
<script lang="ts">
  import { toast } from '@hiai-gg/hiai-ui/components/ui/sonner/index';

  function handleSave() {
    toast.success("Settings saved!");
  }
</script>

Ecosystem

Contributing

See CONTRIBUTING.md.

Changelog

See CHANGELOG.md.

License

MIT © 2025 HiAi — see LICENSE.