Skip to content

FormToggle

A component that can be a quick indicator for switching condition.

size
Component size
type:String
default:md
values:sm, md, lg

Slots

default
Default slot for label for toggle

Events

update:modelValue
Updating model

Examples

Standard
Additional information about enabling/off activity

Return value:

false

html
<form-field name="ison" :model="ison" template="toggle">
  <form-toggle text="Component activity">
    <form-info text="Additional information about enabling/off activity" />
  </form-toggle>
</form-field>
ts
const ison = useField('ison', toFieldValidator(zod.boolean()), { initialValue: false })