A setting that takes effect the moment it is touched.
Import it from rei-kit:
import { BaseSwitch } from 'rei-kit'
Open BaseSwitch in the live documentation, where every prop below is a control you can change, in four materials and ten palettes.
<script setup lang="ts">
import { ref } from 'vue'
import { BaseSwitch } from 'rei-kit'
const reminders = ref(true)
</script>
<template>
<BaseSwitch v-model="reminders" label="Daily reminder" hint="Every evening at 21:00" />
</template>
| Prop | Type | Required or default | What it is for |
|---|---|---|---|
label | string | yes | |
hint | string | '' | |
disabled | boolean | false | |
labelHidden | boolean | false | For a switch inside a row that already names it — it keeps its accessible name. |
rei-kit is an accessible Vue 3 and Tailwind CSS 4 component library: 106 components, themed by role rather than by colour on three independent axes — ten WCAG-checked palettes, four materials and light or dark, each switched with one attribute. Typed, tested, SSR-safe, no runtime dependencies, MIT.