Socket
Socket
Sign inDemoInstall

vue-radio-toggle-buttons

Package Overview
Dependencies
16
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-radio-toggle-buttons

Radio toggle buttons for Vue.


Version published
Weekly downloads
148
increased by108.45%
Maintainers
1
Install size
826 kB
Created
Weekly downloads
 

Readme

Source

Vue Radio Toggle Buttons

GitHub vue 2 npm npm npm type definitions Travis (.com)

🔘 Radio toggle buttons for Vue.

⚙️ Installation

npm install vue-radio-toggle-buttons
# or
yarn add vue-radio-toggle-buttons

🛂 Usage

main.js:

import Vue from 'vue';
import VueRadioToggleButtons from 'vue-radio-toggle-buttons';

import App from './App.vue';

import 'vue-radio-toggle-buttons/dist/vue-radio-toggle-buttons.css';

Vue.use(VueRadioToggleButtons, {
	color: '#333',
	textColor: '#333',
	selectedTextColor: '#eee'
});

new Vue({
	el: '#app',
	render: h => h(App)
});

App.vue:

<template>
	<RadioToggleButtons
		v-model='currentValue'
		:values='values'
		color='purple'
		textColor='#000'
		selectedTextColor='#fff'
	/>
</template>

<script>
export default {
	name: 'App',
	data() {
		return {
			values: [
				{ label: 'Value 1', value: '1' },
				{ label: 'Value 2', value: '2', disabled: true },
				{ label: 'Value 3', value: '3' },
			],
			currentValue: ''
		}
	}
};
</script>

⚙️ Plugin options

color

Type: string

Global primary color of radio toggle buttons.

textColor

Type: string

Global text color of radio toggle buttons.

selectedTextColor

Type: string

Global text color of selected item of radio toggle buttons.

📚 API

<RadioToggleButtons>

Props
values

Type: Array<{ label: string, value: string, disabled: boolean }>
Required: true

Values of radio toggle buttons.

You can set disabled to true to disable that button.

color

Type: string
Default: '#333'

Primary color of radio toggle buttons.

textColor

Type: string
Default: '#333'

Text color of radio toggle buttons.

selectedTextColor

Type: string
Default: '#eee'

Text color of selected item of radio toggle buttons.

Keywords

FAQs

Last updated on 05 Jan 2020

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