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

tr-vue3ui

v0.0.4

Published

tr-vue3ui Vue 3 component library

Readme

tr-vue3ui

Vue 3 组件库,基于原子设计(Atomic Design)模式构建。

安装

npm install tr-vue3ui
# 或
pnpm add tr-vue3ui

快速上手

全局注册(推荐)

import { createApp } from 'vue'
import App from './App.vue'
import TrVue3ui from 'tr-vue3ui'
import 'tr-vue3ui/styles'

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

全局注册后,所有组件均可使用 tr- 前缀直接在模板中使用:

<template>
  <tr-button variant="primary" @click="handleClick">点击</tr-button>
  <tr-input v-model="value" placeholder="请输入" />
  <tr-modal :visible="visible" title="标题" @close="visible = false">
    <p>内容</p>
  </tr-modal>
</template>

按需引入

<script setup lang="ts">
import { TrButton, TrInput, TrModal } from 'tr-vue3ui'
import 'tr-vue3ui/styles'
</script>

<template>
  <TrButton variant="primary">点击</TrButton>
  <TrInput v-model="value" placeholder="请输入" />
</template>

组件

tr-button

| Prop | 类型 | 默认值 | 说明 | |------|------|--------|------| | variant | 'primary' \| 'secondary' \| 'outline' \| 'ghost' | 'primary' | 按钮样式变体 | | size | 'sm' \| 'md' \| 'lg' | 'md' | 按钮尺寸 | | disabled | boolean | false | 禁用状态 | | loading | boolean | false | 加载状态 | | type | 'button' \| 'submit' \| 'reset' | 'button' | HTML type 属性 |

tr-input

| Prop | 类型 | 默认值 | 说明 | |------|------|--------|------| | modelValue | string \| number | - | v-model 绑定值 | | type | 'text' \| 'password' \| 'email' \| 'number' | 'text' | 输入类型 | | size | 'sm' \| 'md' \| 'lg' | 'md' | 输入框尺寸 | | disabled | boolean | false | 禁用状态 | | readonly | boolean | false | 只读状态 | | invalid | boolean | false | 校验失败状态 | | errorMessage | string | - | 错误提示信息 | | placeholder | string | - | 占位文本 |

tr-modal

| Prop | 类型 | 默认值 | 说明 | |------|------|--------|------| | visible | boolean | - | 显示/隐藏 | | title | string | - | 弹窗标题 | | width | string \| number | - | 弹窗宽度 | | maskClosable | boolean | true | 点击遮罩关闭 | | closeOnEsc | boolean | true | 按 Escape 关闭 |

License

MIT