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

@kasa/web-components

v0.8.12

Published

Shared components for vue

Readme

kasa-web-components

How to use

  1. Install using yarn or npm
yarn add @kasa/web-components
  1. Import css in main.js
import '@kasa/web-components/dist/kasa-web-components.css';
  1. Import the components and delcare it as local components:
import { Button } from '@kasa/web-components';

components: {
  Button
}

OR

Register them as global components:

import KasaWebComponents from '@kasa/web-components';

Vue.use(KasaWebComponents);

Usages

  • Button
<k-button
  [:disabled="disabled"]
  [kind="normal(default), small, border"]
>
  text
<k-button>
  • Checkbox
<k-checkbox
  [v-model="boolean"]
  [:disabled="boolean"]
>
  text
</k-checkbox>
  • Dropdown
<k-dropdown
  [v-model="string"]
  [default-text="text"]
  [disabled="boolean"]
  [
    :items="[
      { text: 'text', value: value }
    ]"
  ]
>
  <k-dropdown-item value="value string">text string</k-dropdown-item>
</k-dropdown>

Remarks: You can use both prop and slot for items.

  • Email input
<k-email-input
  v-model="string"
  [:disabled="boolean"]
  [@focus="callback"]
  [@blur="callback"]
  [@input="callback"]
>
  [<template slot="action"> button or image </template>] // for button action, use TextInputButton
</k-email-input>
  • Password input
<k-password-input
  v-model="string"
  [:disabled="boolean"]
  [show-text-visibility-toggle-button]
  [@focus="callback"]
  [@blur="callback"]
  [@input="callback"]
/>
  • Inline message
<k-inline-message> text </k-inline-message>
  • Radio
<k-radio
  [v-model="value"] // This is picked value in the group.
  [:disabled="disabled"]
  value="value string"
  name="radio" // The radio buttons in the same group must have same name!
>
  text
</k-radio>
  • TextInput
<k-text-input
  v-model="string"
  [v-validate="'email'"]
  [:disabled="boolean"]
  [:kind="string"] // 'big' is the only available option for now
  [:error="boolean"] // error state
  [type="email"] // default is 'text'
  [placeholder="placeholder string"]
  [text-align="right"] // default is 'left'
  [:delete-button="boolean"] // default is false
  [@focus="callback"]
  [@blur="callback"]
  [@input="callback"]
>
  [<template slot="label"> inner label </template>]
  [<template slot="action"> button or image </template>] // for button action, use TextInputButton
</k-text-input>
  • Inner button of text input
<k-text-input-button
  [:disabled="boolean"]
  [type="submit or button ..."]
  [@click.native="callback"] // must use native modifier!
>
  text
</k-text-input-button>
  • Label for TextInput
<k-text-input-label
>
  Text here!

  [<template slot="extra"> element placed on the right  </template>]
</k-text-input-label>
  • Switch
<k-switch
  on-text="ON"
  [:disabled="disabled"]
  [off-text="OFF"]
/>

Css selector

Every component has its component name as a css class. For example, you can select TextInput with .k-text-input selector, Checkbox with .k-check-box selector, and so on.

Directives

  • Formatter for k-text-input You can restrict characters that can be input or format the value with it.
<k-text-input
  v-format.immediate="'currency'" // 'immediate' modifier is an option which formats the value as soon as the component loaded.
                                  // 'currency', 'number', 'alphaNumeric', 'uppercase' and 'lowercase' are possible values.
                                  // You can chain formatters with '|'. i.e. 'alphaNumeric|uppercase' chains two formatters.
  // Or you can write functions to manipulate and format the value.
  v-format="{
    [strip: value => changed value;] // The function that unformats the value before formatting, it is useful to remove extra characters added by the format function. This is optional.
    format: value => formatted value; // The formatting function
  }"

  v-model="value"
/>

Remarks: When the format directive is specified, the change event of k-text-input is not triggered on the IE11. See this

For developers

Project setup

yarn install

Compiles and hot-reloads for demo

yarn run serve

Build for lib

yarn run build:lib

Lints and fixes files

yarn run lint

Run your unit tests

yarn run test:unit