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

vue-ui-lib-demo

v0.0.7

Published

A demo **UI library built with Vue 3**, created to showcase reusable component design, code organization, and testing practices. The library includes **typed Vue components**, unit tests, and Storybook examples with full customization support through CSS

Downloads

3

Readme

🎨 Vue UI Lib Demo

A demo UI library built with Vue 3, created to showcase reusable component design, code organization, and testing practices. The library includes typed Vue components, unit tests, and Storybook examples with full customization support through CSS variables.

✨ Project Goals

  • Demonstrate how to design and publish a UI library to npm
  • Build clean, reusable, and typed components
  • Set up infrastructure with Vite, Vitest, and Storybook
  • Provide easy theming via CSS variables
  • Create a foundation for an extendable design system

🚀 Key Features

  • 📦 3 base components: UInput, UButton, UCard
  • 🔒 Full TypeScript typings for props, emits, and slots
  • 🧪 Unit tests for each component (Vitest + @vue/test-utils)
  • 📖 Storybook with live examples and playground
  • 🎨 Theming via CSS variables → easily customized per project
  • ⚡ Built with Vite (lib mode) → optimized output
  • 🛠 ESLint + Prettier → consistent code style

🛠 Tech Stack


📦 Installation & Usage

npm install vue-ui-lib-demo@latest

In your Vue project:

import { createApp } from 'vue'
import App from './App.vue'

import VueUiLibDemo from 'vue-ui-lib-demo'
import 'vue-ui-lib-demo/style'

// Example of theming (override CSS variables)
import './styles/index.css'

const app = createApp(App)
app.use(VueUiLibDemo)
app.mount('#app')

🧩 Components

🔘 UButton

<UButton @click="onClick">Primary</UButton>
<UButton variant="secondary">Secondary</UButton>
<UButton variant="warning" size="lg">Warning</UButton>
<UButton variant="danger" disabled>Error</UButton>

📝 UInput

<UInput v-model="email" type="email" placeholder="Enter email" />
<UInput placeholder="Search..." />
<UInput disabled value="Disabled field" />

📦 UCard

<UCard>
  <template #header>Card Header</template>
  Main card content
  <template #footer>Footer content</template>
</UCard>

📖 Storybook

Run Storybook for interactive docs:

npm run storybook

Build Storybook:

npm run build-storybook

🧪 Testing

Run unit tests:

npm run test:unit

With coverage:

npm run test:unit -- --coverage

📂 Project Structure

src/
 ├── components/
 │    ├── UButton/
 │    ├── UCard/
 │    └── UInput/
 ├── styles/
 │    ├── base.css
 │    ├── theme.css
 │    └── index.css
 └── index.ts

🎨 Theming

All component styles rely on CSS variables. Override them in your project ('./styles/index.css') like so:

:root {
  --btn-primary-bg: #4ade80;
  --btn-primary-color: #000;
  --color-card-bg: #f9fafb;
}

⚙️ Scripts

npm run dev            # start dev server
npm run build          # build the library
npm run lint           # lint code
npm run format         # auto-format with prettier
npm run storybook      # start Storybook
npm run test:unit      # run unit tests

📄 License

MIT License — free to use and modify.


💬 Feedback

If you have ideas for improvements, feel free to open an Issue or PR. ⭐️ If this project was useful — please give it a star on GitHub!