TagsCommunity Asset

Open in new window
Open in new window
Open in new window
Open in new window
Open in new window
Open in new window
View RTL
<script setup lang="ts">
type TagsExampleData = {
  vowels: string[]
  consonant: string[]
}

const alphabet = Array.from({ length: 26 }, (_, i) =>
  String.fromCharCode(65 + i),
)
const vowels: TagsExampleData['vowels'] = ['A', 'E', 'I', 'O', 'U']
const consonant: TagsExampleData['consonant'] = alphabet.filter(
  (char) => !vowels.includes(char),
)

const isEditing = ref<boolean>(false)
const inlineEdit = ref<boolean>(false)
const expand = ref<boolean>(true)
const selectedTags = ref<string[]>([])
</script>

<template>
  <div class="n-stack">
    <div class="n-stack n-stack-horizontal">
      <provet-toggle
        label="Edit mode"
        :checked="isEditing"
        @change="isEditing = !isEditing"
      />

      <provet-toggle label="Inline-edit" @change="inlineEdit = !inlineEdit" />

      <provet-toggle label="Expand" checked @change="expand = !expand" />
    </div>

    <EditableField :is-editing>
      <BaseTags
        v-model:is-editing="isEditing"
        v-model:selected-tags="selectedTags"
        :categories="[
          { label: 'Vowels', tags: vowels },
          { label: 'Consonants', tags: consonant },
        ]"
      />

      <template #edit>
        <ComboboxMultiple
          v-model="selectedTags"
          label="Alphabet"
          hide-label
          :inline-edit
          :expand
          :options="
            alphabet.map((letter) => ({ label: letter, value: letter }))
          "
        />
      </template>
    </EditableField>
  </div>
</template>

Integration

This community asset is currently only available to use in the New Frontend for Provet Cloud.


Troubleshooting

If you experience any issues while using this community asset, please ask for support in the #vet-frontend Slack channel.


Was this page helpful?

YesNo
Send feedback

We use this feedback to improve our documentation.

 
Edit page
Choose therapy brandChoose veterinary brandAbout Nord Design SystemGet support