Skip to content
On this page

Model Value

Array of selected reactions to show

Prop nameTypeDefault valueRequired
model-valueISelectedReactionsItem[]-Y

Example of prop value

typescript
[
    {
        id: 1,
        count: 1
    },
    {
        id: 2,
        count: 2
    },
    {
        id: 3,
        count: 2
    }
]

ISelectedReactionsItem

typescript
interface ISelectedReactionsItem {
    id: number | string;
    count: number;
}
KeyTypeRequired
idstring or numberY
countnumber >= 1Y

Code example

vue
<template>
  <vue-reactions :model-value="selectedReactions" />
</template>

<script setup lang="ts">
import { ref } from "vue";

const selectedReactions = ref([
  {
    id: 1,
    count: 1
  },
  {
    id: 2,
    count: 2
  },
  {
    id: 3,
    count: 2
  }
]);
</script>