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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ckd/vue-button

v0.1.1-alpha.2

Published

## Installation ``` yarn add @ckd/vue-button@latest ```

Downloads

4

Readme

CKD Vue Button

Installation

yarn add @ckd/vue-button@latest

Demo

A simple demo of several component implementations can be found in the packages /demo directory. It can be run using yarn serve

Usage

Register the component for use in a Vue application

import Button from '@ckd/vue-button'

// Import vue-button stylesheet
import '@ckd/vue-button/dist/@ckd/vue-button.css'

Vue.component('v-button', Button)

or, use UMD:

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/@ckd/vue-button"></script>

<link rel="stylesheet" href="https://unpkg.com/@ckd/vue-button@latest/dist/@ckd/vue-button.css">

<script>
new Vue({
  components: {
    VButton: window['@ckd/vue-button']
  }
}).$mount('#app')
</script>

Then, use the component in your markup

<v-button :button-color="rebeccapurple" :text-color="#fff" :ripple-offset="0.6">My Cool Button</v-button>

Options

| Option | Accepted Value | Default | Description | |----------------|------------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | loading | Boolean | false | Whether or not the button's loading animation should be showing. A true value also applies the is-loading class to the root node of the component and set the disabled attribute on the element itself. It will not apply the is-disabled class as well. | | ripple | Boolean | true | Whether or not to include a ripple effect on the button when clicked. Set to false to disable it. | | disabled | Boolean | false | Whether or not the button is considered disabled. This adds an is-disabled class to the root node of the component, adds the disabled attribute to the button, prevents a ripple effect even if enabled, and (if using the @ckd/vue-button stylesheet), will add the not-allowed cursor on hover | | buttonColor | String | #231e49 | The background color of the button. Defaults to the CKD theme color. | | textColor | String | null | The text color of the button. By default, the color will simply be inherited from the parent element. | | rippleColor | String | null | The color of the ripple effect. Can be any valid color value (hex, rgba, hsl, name, etc.) If not specified, the buttonColor and rippleOffset props are used to calculate the ripple color using the color-parse library. | | rippleOffset | Number | -0.4 | If rippleColor is not defined, this is a positive or negative value between -1 and 1 that determines how much to darken or lighten the buttonColor in order to use as the ripple color. A negative value implies darker, positive is lighter. The ripple color using the default offset is the value of buttonColor, darkened 40% | | rippleDuration | Number | 400 | A time, in milliseconds, for the ripple to complete animating. | | rippleScale | Number | null | A multiplier value that determines the final size of the ripple effect. The original size of the ripple element is 40px x 40px, so a value of 3 would result in a final ripple size (when it reaches 0% opacity) of 120px x 120px. You should rarely if ever need to set this prop as the scale is calculated automatically on click, however if you wanted to have a smaller than usual ripple effect, or a really giant one, this is a way to control that. |

Tests

Tests are written with jest, and can be run with yarn test