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

@thehammer/danx-ui

v0.8.17

Published

Zero-dependency Vue 3 + Tailwind CSS v4 component library with three-tier theming

Readme

danx-ui

npm version license

Zero-dependency Vue 3 + Tailwind CSS v4 component library with three-tier theming.

Features

  • Zero Runtime Dependencies - Only Vue 3 as peer dependency
  • Tree-Shakeable - Import only what you need
  • Three-Tier Theming - Primitive → Semantic → Component token system
  • Dark Mode Built-in - Just add .dark class
  • 100% Declarative - v-model controlled, no imperative APIs
  • Native Elements - Uses <dialog> for accessibility
  • Styles Optional - Components work without CSS imports

Installation

npm install danx-ui
# or
yarn add danx-ui
# or
pnpm add danx-ui

Quick Start

Import Everything

import { DanxDialog, useDialog } from 'danx-ui';
import 'danx-ui/styles';

Import Just What You Need

// Just the dialog component
import { DanxDialog } from 'danx-ui/components/dialog';
import 'danx-ui/components/dialog/styles';

// Just the composable (no component)
import { useDialog } from 'danx-ui/components/dialog/useDialog';

// Just the tokens (for custom themes)
import 'danx-ui/shared/tokens';

Usage

Basic Dialog

<template>
  <button @click="showDialog = true">Open Dialog</button>

  <DanxDialog
    v-model="showDialog"
    title="Hello World"
    close-button
  >
    <p>Dialog content goes here.</p>
  </DanxDialog>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { DanxDialog } from 'danx-ui';

const showDialog = ref(false);
</script>

Confirm Dialog

<DanxDialog
  v-model="showConfirm"
  title="Confirm Action"
  close-button="Cancel"
  confirm-button="Delete"
  :is-saving="isDeleting"
  @confirm="handleDelete"
>
  <p>Are you sure you want to delete this item?</p>
</DanxDialog>

Custom Sizing

<!-- 80vw × 60vh -->
<DanxDialog v-model="show" :width="80" :height="60" />

<!-- Fixed size -->
<DanxDialog v-model="show" width="400px" height="300px" />

<!-- Full screen -->
<DanxDialog v-model="show" :width="100" :height="100" />

Theming

danx-ui uses a three-tier CSS token system:

  1. Primitives - Raw color palette, spacing, etc.
  2. Semantics - Contextual meaning (surface, text, interactive)
  3. Component - Per-component tokens

Customization Levels

Tweak a component:

.my-dialog {
  --dialog-bg: #f0f0f0;
}

Change system-wide behavior:

:root {
  --color-surface: #fafafa;
  --color-interactive: #0066cc;
}

Dark mode:

/* Built-in - just add .dark class to html or body */
<html class="dark">

See Theming Guide for details.

Documentation

Browser Support

  • Chrome (last 2 versions)
  • Firefox (last 2 versions)
  • Safari (last 2 versions)
  • Edge (last 2 versions)

Requires native <dialog> element support.

Contributing

Contributions are welcome! Please read:

License

MIT