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

ctg-vue-components

v1.0.0

Published

A Vue 3 + TypeScript component library, built on frappe-ui and Tailwind CSS.

Readme

Ctg Vue Components

A Vue 3 + TypeScript component library, built on frappe-ui and Tailwind CSS.

Components

| Component | Description | |-----------|-------------| | CtgBadge | Badge with type variants (square, banner, rectangle) and color themes | | CtgCard | Closable card container with header, body, and footer sections | | CtgValueBadge | Value badge with threshold-based color coding and level images | | CtgDiffCompare | Unified diff component for text, JSON, and code comparison |

Install

npm install ctg-vue-components
# or
yarn add ctg-vue-components

Peer dependencies: vue ^3.5 frappe-ui ^0.1 feather-icons ^4 lucide-vue-next ^0.575

Usage

Global registration

import { createApp } from 'vue'
import { CtgVueComponents } from 'ctg-vue-components'
import 'ctg-vue-components/style.css'

const app = createApp(App)
app.use(CtgVueComponents)

Component imports

import { CtgBadge, CtgCard, CtgValueBadge, CtgDiffCompare } from 'ctg-vue-components'

Theme switching

import { setThemeMode } from 'ctg-vue-components'

setThemeMode('dark')  // or 'light'
// Applies data-theme="dark" on <html>, components adapt automatically

CtgDiffCompare

Compare text, JSON, or code with side-by-side or inline layout.

<template>
  <!-- Text comparison -->
  <CtgDiffCompare
    mode="text"
    layout="side-by-side"
    :old-value="oldText"
    :new-value="newText"
  />

  <!-- JSON comparison (with invalid JSON error handling) -->
  <CtgDiffCompare
    mode="json"
    layout="inline"
    :old-value='{"name":"John"}'
    :new-value='{"name":"Jane"}'
  />

  <!-- Code comparison -->
  <CtgDiffCompare
    mode="code"
    :old-value="oldCode"
    :new-value="newCode"
    layout="side-by-side"
  />
</template>

Props:

| Prop | Type | Default | Description | |------|------|---------|-------------| | old-value | string | '' | Original value (left panel) | | new-value | string | '' | New value (right panel) | | mode | 'text' \| 'json' \| 'code' | 'text' | Diff comparison mode | | layout | 'side-by-side' \| 'inline' | 'side-by-side' | View layout |

CtgBadge

<CtgBadge variant="square" size="md" :value="42" unit="items" />

Props: variant (square | banner | rectangle), size (sm | md | lg), value (number), unit (string), color (red | green | blue | ...).

CtgCard

<CtgCard title="My Card" closable @close="onClose">
  <template #header>Card Header</template>
  <p>Card body content</p>
  <template #footer>Card Footer</template>
</CtgCard>

CtgValueBadge

<CtgValueBadge
  :value="50"
  :positive-threshold="10"
  :neutral-threshold="0"
  :danger-threshold="-10"
  variant="subtle"
  unit="items"
/>

Theming

Supports three themes via data-theme attribute on <html>:

| Theme | Default | |-------|---------| | matrix (green-on-black) | ✅ Default | | ctg (blue corporate) | | | fallout (amber-on-green) | |

<html data-theme="fallout">

Components also respond to data-theme="dark" for dark mode variants.

Development

# Install dependencies
yarn install

# Start dev server
yarn dev

# Build for production
yarn build

# Run tests
yarn test

# Watch tests
yarn test:watch

Build

yarn build

Outputs ESM (./dist/ctg-vue-components.es.js) and UMD (./dist/ctg-vue-components.umd.js) bundles with CSS.

License

MIT