Socket
Socket
Sign inDemoInstall

pretty-checkbox-vue

Package Overview
Dependencies
11
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pretty-checkbox-vue

Quickly integrate pretty checkbox Components (checkbox, switch, radio button) with Vue.js


Version published
Weekly downloads
5.3K
decreased by-2.22%
Maintainers
1
Install size
314 kB
Created
Weekly downloads
 

Readme

Source


Quickly integrate pretty checkbox Components (checkbox, switch, radio button) with Vue.js


Github Release Licence

Demo and documentation

Installation

npm i --save-dev pretty-checkbox-vue

Browser

Include the script file, then install the component with Vue.use(PrettyCheckbox); e.g.:

<script type="text/javascript" src="node_modules/vuejs/dist/vue.min.js"></script>
<script type="text/javascript" src="node_modules/pretty-checkbox-vue/dist/pretty-checkbox-vue.min.js"></script>
<script type="text/javascript">
  Vue.use(PrettyCheckbox);
</script>

Module

import PrettyCheckbox from 'pretty-checkbox-vue';

Vue.use(PrettyCheckbox);

Or

import PrettyInput from 'pretty-checkbox-vue/input';
import PrettyCheck from 'pretty-checkbox-vue/check';
import PrettyRadio from 'pretty-checkbox-vue/radio';

Vue.component('p-input', PrettyInput);
Vue.component('p-check', PrettyCheck);
Vue.component('p-radio', PrettyRadio);

Usage

Once installed, it can be used in a template as simply as:

<p-check name="check" color="success" v-model="check">check</p-check>
<p-radio name="radio" color="info" v-model="radio">radio</p-radio>

<!-- Or it can be used just like input -->

<p-input type="checkbox" name="check" color="success" v-model="check">check</p-input>
<p-input type="radio" name="radio" color="info" v-model="radio">radio</p-input>

Properties

PropertyTypeDefault Value
typeStringcheckbox (checkbox & input) or radio (radio)
nameString
valueAny
classStringp-default (checkbox & input) or p-default p-round (radio)
true-valueBoolean or Stringtrue
false-valueBoolean or Stringfalse
checkedBooleanfalse
disabledBooleanfalse
requiredBooleanfalse
indeterminateBooleanfalse
colorString
off-colorString
hover-colorString
indeterminate-colorString
toggleBooleanfalse
hoverBooleanfalse
focusBooleanfalse

Slots

NamePurpose
default (no name)include label in default mode or for "on" state in toggle mode
extrainclude icon or svg or image in default mode or for "on" state in toggle mode
off-labelinclude label for "off" state in toggle mode
off-extrainclude icon or svg or image for "off" state in toggle mode
hover-labelinclude label in hover state
hover-extrainclude icon or svg or image in hover state
indeterminate-labelinclude label in indeterminate state
indeterminate-extrainclude icon or svg or image in indeterminate state

If you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on Github.

License

Released under The MIT License. Copyright (c) hamed-ehtesham.

Keywords

FAQs

Last updated on 12 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc