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

@kordar-lib/common

v2.0.0

Published

通用样式与基础类型集合: - 样式:内置大量颜色类名(.color-xxx),打包输出 dist/index.min.css,便于在任意项目中即用即取 - 类型:提供通用 UI 类型定义(当前包含面包屑 Breadcrumb 相关类型)

Readme

@kordar-lib/common

通用样式与基础类型集合:

  • 样式:内置大量颜色类名(.color-xxx),打包输出 dist/index.min.css,便于在任意项目中即用即取
  • 类型:提供通用 UI 类型定义(当前包含面包屑 Breadcrumb 相关类型)

特性

  • 颜色工具类
    • 基于 SCSS 预置上百种颜色类:.color-black、.color-blue、.color-red 等
    • 通过打包生成 dist/index.min.css,可直接在应用中按需引入
  • 基础类型
    • 面包屑类型:BreadcrumbItem、BreadcrumbProps、BreadcrumbState
    • 仅类型定义,不绑定具体框架实现,适合复用

安装

npm install @kordar-lib/common

样式引入

全量引入打包后的样式:

import '@kordar-lib/common/dist/index.min.css'

HTML 使用示例:

<span class="color-red">Red</span>
<span class="color-deep-sky-blue">DeepSkyBlue</span>

类型使用

按需引入并在 TS 中使用类型:

import type { BreadcrumbItem, BreadcrumbProps, BreadcrumbState } from '@kordar-lib/common'

const items: BreadcrumbItem[] = [
  { label: '首页', path: '/' },
  { label: '列表', path: '/list' },
  { label: '详情' }
]

const props: BreadcrumbProps = {
  hasBack: true,
  backIcon: 'arrow-left',
  items
}

导出一览

  • assets
    • dist/index.min.css:颜色工具类集合
  • component
    • BreadcrumbItem
    • BreadcrumbProps
    • BreadcrumbState

构建与类型(Monorepo:npm)

在仓库根目录执行:

npm install
npm run -w @kordar-lib/common build

类型检查:

npm exec -w @kordar-lib/common -- tsc -p tsconfig.json --noEmit

许可证

MIT