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

hitab

v0.0.6

Published

A Vue2 component for Chrome-like tabs.<br> Drag-and-drop support provided by Draggabilly by @desandro.

Downloads

19

Readme

vue-tabs-chrome

A Vue2 component for Chrome-like tabs. Drag-and-drop support provided by Draggabilly by @desandro.

Live Demo

https://viewweiwu.github.io/vue-tabs-chrome/

Code Sandbox Example

https://codesandbox.io/s/kind-wave-00ipv?file=/src/App.vue

Install

npm i hitab -S

Usage

<template>
  <hitab v-model="tab" :tabs="tabs" />
</template>
<script>
  import Vue from 'vue'
  import hitab from 'hitab'

  export default {
    components: {
        hitab
    },
    data() {
      return {
        tab: 'google',
        tabs: [
          {
            label: 'google',
            key: 'google',
            closable: false,
            favicon: require('./assets/google.jpg')
          },
          {
            label: 'facebook',
            key: 'facebook',
            favicon: require('./assets/fb.jpg')
          },
          {
            label: 'New Tab',
            key: 'any-string-key',
            favicon: (h, { tab, index }) => {
              return h('span', tab.label)
            }
          }
        ]
      }
    }
  }
</script>

Attributes

| Attributes | Description | Type | Default | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- | ------- | | tabs | tabs configuration. Details are mentioned below. | Array | [] | | value / v-model | binding value | String | - | | props | configuration options, Details are mentioned below. | | insert-to-after | Insert to tag's after | Boolean | false | | is-mousedown-active | set tab is active when mousedown | Boolean | true | | render-label | render label | Function(tab, index) | - | | auto-hidden-close-icon-width | auto hidden close tab width. if tabWidth < 120, close icon can not show. If you don’t want this feature, you can set the value to 0. | Number | 120 | | on-close | when tab close btn click. if return false, it cannot be closed. | Function(tab, key, index) | - |

Tabs Attributes

| Attributes | Description | Type | Default | | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ------- | | label | tab label | String | - | | key | tab key | String | - | | class | tab class | String | - | | closable | tab closable | Boolean | true | | dragable | tab tragable | Boolean | true | | swappable | tab swappable | Boolean | true | | favicon | tab favicon. Custom favicon renderer. It uses Vue's render function. It accepts two arguments: the first is h, the second is an object. including tab and index | Function, required image | - |

Props Attributes

| Attributes | Description | Type | Default | | ---------- | ---------------------------------------------------------- | ------ | ------- | | label | specify which key of tab object is used as the tab's label | String | 'label' | | key | specify which key of tab object is used as the tab's key | String | 'key' |

Methods

| Method | Description | Parameters | | --------- | ----------- | --------------------------- | | addTab | add tab | (tab1, [, ...tab, ...tabN]) | | removeTab | remove tab | (tabKey or index) | | getTabs | get tabs | - |

Events

| Event Name | Description | Parameters | | ----------- | ------------------------------------------------------------------------------------------------------ | ------------------- | | click | Triggered when the user's pointer is pressed and unpressed and has not moved enough to start dragging. | (event, tab, index) | | swap | Swap tab | (tab, targetTab) | | remove | Remove tab | (tab, index) | | contextmenu | Contextmenu event | (event, tab, index) | | dragstart | Tab dragstart event | (event, tab, index) | | dragging | Tab dragstart event | (event, tab, index) | | dragend | Tab dragend event | (event, tab) |

Slots

| Attributes | Description | | ---------- | -------------- | | after | Tab after slot |