Form
Forms are used to collect data from users, and send the collected data to a function or an API.
vue
<script setup lang="ts">
import { Form, Button, Input, Select, Textarea } from '@sigveh/basic-ui'
function handleSubmit(event: SubmitEvent): void {
// ...
}
</script>
<template>
<Form @submit="handleSubmit">
<Input name="email" label="Email" type="email" required />
<Select name="animal" label="Favorite animal" :items="animals" />
<Textarea name="comment" label="Comment" />
<Button theme="primary" type="submit">Submit</Button>
</Form>
</template>