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

components-ui-vuejs-test

v1.0.3

Published

[![npm version](https://img.shields.io/npm/v/components-ui-vuejs-test.svg)](https://www.npmjs.com/package/components-ui-vuejs-test) [![License](https://img.shields.io/npm/l/components-ui-vuejs-test.svg)](https://github.com/your-username/components-ui-vuej

Readme

Components UI Vue.js Test

npm version License

Thư viện UI components dành cho Vue.js 3 được xây dựng với TypeScript và Vite.

🚀 Tính năng

  • ✅ Hỗ trợ Vue 3 + TypeScript
  • ✅ Tree-shaking friendly
  • ✅ ES modules và UMD
  • ✅ Styled components với CSS scoped
  • ✅ Dễ dàng tùy chỉnh

📦 Cài đặt

npm install components-ui-vuejs-test

🔧 Cách sử dụng

Phương pháp 1: Sử dụng Plugin (Recommended)

// main.js
import { createApp } from 'vue'
import App from './App.vue'
import ComponentsUI from 'components-ui-vuejs-test'
import 'components-ui-vuejs-test/dist/style.css'

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

Sau đó sử dụng trong template:

<template>
  <div>
    <LearnVueButton>Click me!</LearnVueButton>
  </div>
</template>

Phương pháp 2: Import từng component (Tree-shaking)

<template>
  <div>
    <LearnVueButton>Custom Button</LearnVueButton>
  </div>
</template>

<script>
import { LearnVueButton } from 'components-ui-vuejs-test'

export default {
  components: {
    LearnVueButton,
  },
}
</script>

Phương pháp 3: Import trực tiếp từ source (Development)

<template>
  <div>
    <LearnVueButton>Direct Import</LearnVueButton>
  </div>
</template>

<script>
import LearnVueButton from 'components-ui-vuejs-test/components/LearnVueButton.vue'

export default {
  components: {
    LearnVueButton,
  },
}
</script>

TypeScript Support

<script lang="ts">
import { defineComponent } from 'vue'
import { LearnVueButton } from 'components-ui-vuejs-test'

export default defineComponent({
  components: {
    LearnVueButton,
  },
})
</script>

📚 Components

LearnVueButton

Button component đơn giản với styling mặc định.

Props

Hiện tại chưa có props (sẽ được thêm trong phiên bản tương lai)

Slots

  • default: Nội dung của button

Events

  • click: Được emit khi button được click

Ví dụ sử dụng

<template>
  <div>
    <!-- Button đơn giản -->
    <LearnVueButton @click="handleClick">Click me</LearnVueButton>

    <!-- Button với slot content -->
    <LearnVueButton @click="handleSubmit">
      <span>🚀 Submit</span>
    </LearnVueButton>
  </div>
</template>

<script>
export default {
  methods: {
    handleClick() {
      console.log('Button clicked!')
    },
    handleSubmit() {
      console.log('Form submitted!')
    },
  },
}
</script>

🎨 Tùy chỉnh Style

CSS Variables (Recommended)

:root {
  --learn-vue-button-bg: #42b983;
  --learn-vue-button-color: white;
  --learn-vue-button-padding: 10px 20px;
  --learn-vue-button-border-radius: 5px;
}

CSS Override

<style>
/* Ghi đè style của LearnVueButton */
.learn-vue-button {
  background-color: #ff6b6b !important;
  border-radius: 10px !important;
  font-weight: bold !important;
}

.learn-vue-button:hover {
  background-color: #ff5252 !important;
  transform: translateY(-1px);
}
</style>

🚀 Phát triển và Đóng góp

Build từ source

# Clone repository
git clone https://github.com/your-username/components-ui-vuejs-test.git
cd components-ui-vuejs-test

# Cài đặt dependencies
npm install

# Chạy development server
npm run dev

# Build cho production
npm run build

# Type checking
npm run type-check

# Linting
npm run lint

Test package local

# Trong thư mục package
npm run build
npm pack

# Trong project test
npm install ./components-ui-vuejs-test-1.0.1.tgz

📁 Cấu trúc build output

dist/
├── es.js              # ES modules
├── umd.js             # UMD format
├── components-ui-vuejs-test.css  # Styles
└── types/             # TypeScript definitions

⚠️ Troubleshooting

Lỗi "Failed to resolve entry"

Đảm bảo bạn đã:

  1. Install đúng package: npm install components-ui-vuejs-test
  2. Import đúng cú pháp
  3. Có file dist/es.jsdist/umd.js trong package

Lỗi styles không hiển thị

// Đảm bảo import CSS
import 'components-ui-vuejs-test/dist/style.css'

TypeScript errors

Thêm vào vite-env.d.ts:

declare module 'components-ui-vuejs-test' {
  import type { DefineComponent } from 'vue'
  export const LearnVueButton: DefineComponent<{}, {}, any>
  const plugin: any
  export default plugin
}

📄 License

MIT License