Skip to content

aeria-options

This component renders a group of checkboxes (or radio inputs) depending on the property type.

Example

Single choice
a
Multiple choice
[]
vue
<script setup lang="ts">
const singleChoice = ref('')
const multipleChoice = ref('')
</script>

<template>
  <aeria-options
    v-model="singleChoice"
    :property="{
      enum: [
        'a',
        'b',
        'c',
      ]
    }"
  ></aeria-options>
  <pre>Single choice: {{ singleChoice }}</pre>

  <aeria-options
    v-model="multipleChoice"
    :property="{
      type: 'array',
      items: {
        enum: [
          'a',
          'b',
          'c',
        ]
      }
    }"
  ></aeria-options>
  <pre>Multiple choice: {{ multipleChoice }}</pre>
</template>

Released under the MIT License.