vue-tri-state-checkbox
v1.0.0
Published
<div align="center"> <img src="https://github.com/MatijaNovosel/tri-state-checkbox/assets/36193643/3d93f8b2-7f57-41b9-9bb2-dce3b79b051b" /> </div>
Downloads
32
Maintainers
Readme
🚀 Installation
Install using your package manager of choice:
yarn add vue-tri-state-checkbox
📺 Demo
https://matija-components.vercel.app/tri-state-checkbox
⚙️ Usage
Import the component locally or define it globally and include the css file:
<template>
<tri-state-checkbox v-model="val" label="Vite + Vue" />
</template>
<script lang="ts" setup>
import { ref } from "vue";
import { TriStateCheckbox } from "vue-tri-state-checkbox";
import "vue-tri-state-checkbox/dist/style.css";
const val = ref(null);
</script>
📃 Props
| Name | Type | Default | Description |
| ---------- | ------------------ | ------- | ---------------------------------- |
| v-model
| boolean/null
| | Standard two way input |
| disabled
| boolean
| false | Makes the component uninteractable |
| color
| string
| #3ba13b | Color of the checkbox background |
| label
| string/undefined
| | Checkbox label |