Skip to content

Toggle

A two-state button that can be either on or off.

When to Use

  • To enable or disable a feature.
  • If each item in a list or set can be individually controlled.

Usage

ts
import { ref } from 'vue';
import { Toggle } from '@youcan/alto';

const active = ref(false);
vue
<Toggle v-model="active" />

API Reference