Appearance
FormTagsInput
Free text turned into removable chips, with separators and paste.
ts
import { FormTagsInput } from '@zairakai/vue-components/Form'Usage
vue
<FormTagsInput />Example
vue
<script setup>
import { ref } from 'vue'
const tags = ref(['one', 'two'])
</script>
<template>
<FormTagsInput
v-model="tags"
label="Tags"
placeholder="Type, then Enter or comma"
/>
</template>Props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | ||
class | string | ||
modelValue | array | undefined | |
separators | array | [',', ';'] | The characters that end a tag when typed or pasted, besides Enter. |
max | number | ||
allowDuplicates | boolean | false | |
label | string | ||
placeholder | string | ||
name | string | ||
form | string | ||
disabled | boolean | false | |
removeLabel | string | 'Remove' |
Events
| Name | Description |
|---|---|
update:modelValue | |
reject |
See Theming for the class hooks and the data-* state of the components.