<script setup>
import { ref } from 'vue'
const text = ref('Edit me')
const checked = ref('true')
const checkedNames = ref([])
const multiSelected = ref([])
const picked = ref('One')
const selected = ref('value is A')
const width = ref('100px')
</script>
<template>
<h2>Text Input</h2>
<input v-model="text"> {{text}}
<h2>Checkbox</h2>
<input type="checkbox" id="checkbox" v-model="checked">
<h2>Multi Checkbox</h2>
<input type="checkbox" id="jack" value="Jack" v-model="checkedNames">
<label for="jack">Jack</label>
<input type="checkbox" id="hero" value="Hero" v-model="checkedNames">
<label for="hero">Hero</label>
<input type="checkbox" id="potato" value="Potato" v-model="checkedNames">
<label for="potato">Potato</label>
<pre>{{ checkedNames }}</pre>
<h2>Radio</h2>
<input type="radio" id="one" value="One" v-model="picked">
<label for="one">One</label>
<input type="radio" id="two" value="Two" v-model="picked">
<label for="two">Two</label>
<pre>{{picked}}</pre>
<h2>Select</h2>
<select v-model="selected">
<option disabled value="">Please select one</option>
<option value="value is A">A</option>
<option value="value is B">B</option>
<option value="value is C">C</option>
</select>
<pre>{{selected}}</pre>
<h2>Multi Selected</h2>
<select v-model="multiSelected" multiple style="width: 100px">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
<pre>{{multiSelected}}</pre>
</template>