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

lw-ui-lib

v1.0.16

Published

A lightweight UI component library based on Vue 3

Downloads

25

Readme

UI-Lib 组件库

项目概述

lw-ui-lib 是一个基于 Vue 3 的轻量级 UI 组件库,提供常用的官网组件,所有组件均以 H 开头命名。

安装

npm install lw-ui-lib

快速开始

全局引入

import HUI from 'lw-ui-lib'
import 'lw-ui-lib/dist/style.css'

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

按需引入

import { HButton, HCard } from 'lw-ui-lib'

组件列表

| 组件名称 | 功能描述 | | --------- | -------------------- | | HHeader | 网站顶部导航栏组件 | | HFooter | 网站底部信息组件 | | HBanner | 轮播图或广告横幅组件 | | HCard | 卡片式内容展示组件 | | HButton | 自定义按钮组件 | | HInput | 输入框组件 | | HModal | 模态框组件 |

使用示例

HButton 示例

<HButton :dataMap="{ label: '点击我', disabled: false }" @click="handleClick" />

HCard 示例

<HCard :dataMap="{ title: '标题', description: '描述内容' }" />

HInput 示例

<HInput v-model="inputValue" placeholder="请输入内容" />

HModal 示例

<HModal v-model="isModalVisible" title="提示" content="这是一个模态框示例" />

配置文件说明

config.js 文件用于全局配置组件库的行为,例如主题、默认语言等。

配置示例

// src/components/config.js
export default {
  theme: 'light', // 可选值: 'light', 'dark'
  language: 'zh-CN', // 可选值: 'zh-CN', 'en-US'
  defaultButtonSize: 'medium' // 可选值: 'small', 'medium', 'large'
}

使用配置

import config from 'lw-ui-lib/config'

// 动态修改配置
config.theme = 'dark';

开发指南

  1. 组件开发:所有组件位于 src/components 目录下,命名以 H 开头。
  2. 动态传值:组件支持通过 dataListdataMap 动态渲染内容。
  3. 导出规则:组件库通过 src/index.js 自动导出所有组件。
  4. 样式规范:组件样式使用 SCSS 编写,统一在 src/styles 目录下管理。

贡献

欢迎提交 Pull Request 或 Issue 改进组件库!