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 🙏

© 2025 – Pkg Stats / Ryan Hefner

nav-tab

v0.0.1-rc.2

Published

A mobile touch-swappable navigation tabs component for Vue3.x

Readme

欢迎

本项目有任何问题,欢迎提 issue 。

项目介绍

这是一个移动端 UI 插件项目,是一个可滑动切换的导航栏组件,基于 Vue3.x + TypeScript + Vite 开发。

入口文件为 src/index.ts

支持全局注册和按需引入,详见 src/index.ts

安装

npm install nav-tab

构建

npm run build

示例:

$ npm run build

> [email protected] build
> vue-tsc -b && vite build --mode build

vite v6.1.0 building for build...
transforming...
✓ 13 modules transformed.
rendering chunks...
computing gzip size...
dist/nav-tab.css     1.14 kB │ gzip: 0.49 kB
dist/es/nav-tab.js  10.67 kB │ gzip: 4.04 kB │ map: 33.58 kB
Entry module "src/index.ts" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
dist/nav-tab.css      1.14 kB │ gzip: 0.49 kB
dist/cjs/nav-tab.cjs  7.54 kB │ gzip: 2.91 kB │ map: 32.97 kB
✓ built in 208ms

作为依赖库使用

全局注册或按需引入

case1、全局注册

示例:

import { createApp } from 'vue'
import App from './App.vue'
import NavTab from 'nav-tab'
// - 【#警告】:此处引入的样式较早,会被后面引入的样式覆盖;也可能被前面引入的样式(如 ./style.css)影响(非覆盖)。
import 'nav-tab/nav-tab.css';

const app = createApp(App)
app.use(NavTab) // 全局引入 nav-tab 插件
app.mount('#app')

case2、按需引入

示例:

import { TabItem, TabsHead, TabsBottom } from 'nav-tab';
import 'nav-tab/nav-tab.css';

样式的引用

样式的引用方式,要参考**「nav-tab 库 -> package.json -> exports 选项」**中,导出样式文件的方式。

比如:

"exports": {
    "./nav-tab.css": "./dist/nav-tab.css",
},

那么,import 'nav-tab/nav-tab.css'; 就相当于引入了 ./dist/nav-tab.css