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

@huhu1254153/ui-base

v0.1.0

Published

黑白配色 + 渐变强调的 Vue3 设计系统基础组件库(BaseButton / BaseCard / FormField + 设计令牌)

Readme

@your-org/ui-base

黑白中性主色 + 渐变强调的 Vue 3 设计系统基础组件库。抽离自实际项目,可跨项目复用。

包含:

  • 设计令牌 + 共享类(CSS):.card / .btn(.btn--primary/.btn--ghost/.btn--danger/.btn--sm) / .field+.field__label(.is-required) / .badge / .filechip / 应用外壳 .app-shell+.app-header+.app-main / .section-title+.section-actions / 通用工具类 .u-*。
  • 基础组件:BaseButton / BaseCard / FormField。

安装

npm i @your-org/ui-base
# 或发布到内部仓库后:npm i @your-org/ui-base --registry <内部registry>

使用(全局注册,推荐)

// main.js
import { createApp } from 'vue'
import App from './App.vue'
import UiBase from '@your-org/ui-base'
import '@your-org/ui-base/style.css'   // 必须:设计令牌与共享类

createApp(App).use(UiBase).mount('#app')

之后任意 .vue 直接用,无需 import:

<BaseCard title="用户列表">
  <template #actions>
    <BaseButton variant="primary" size="sm" @click="add">+ 新增</BaseButton>
  </template>
  <FormField label="姓名" required>
    <input v-model="name" placeholder="请输入" />
  </FormField>
</BaseCard>

使用(按需)

import { BaseButton } from '@your-org/ui-base'
import '@your-org/ui-base/style.css'
<BaseButton variant="ghost">取消</BaseButton>

自定义前缀(避免组件名冲突)

app.use(UiBase, { prefix: 'Ui' })   // 注册为 UiBaseButton / UiBaseCard / UiFormField

换肤

只改 node_modules/@your-org/ui-base/dist/ui-base.css 顶部 :root 令牌,或fork 本仓库后改 src/styles/design-system.css 再 npm run build:

  • --brand:主色(当前近黑 #111827)
  • --gradient / --gradient-soft:强调渐变(当前靛蓝→青)
  • --r*:圆角;--sh*:阴影;--gap:间距

开发 / 构建

npm install
npm run build      # 产出 dist/:ui-base.js(ESM) / ui-base.umd.cjs / ui-base.css
npm run dev        # 本地预览(可在此接一个 demo 页调样式)

发布到内部仓库

npm run build
npm publish --registry <内部registry>