Toggle

Examples

Toggle

<div class="text-center">
  <dv-toggle />
</div>
vue

Toggle color

<div class="text-center space-y-2 flex items-center flex-col">
  <dv-toggle
    defaultValue
    v-for="variant in ['neutral', 'primary', 'secondary', 'accent', 'info']"
    :variant="variant"
  />
</div>
vue

Toggle size

<div class="text-center">
  <dv-toggle size="xs" />
  <div class="h-2" />
  <dv-toggle size="sm" />
  <div class="h-2" />
  <dv-toggle size="md" />
  <div class="h-2" />
  <dv-toggle size="lg" />
</div>
vue

Toggle

Attributes

namedescriptiontypedefault
v-modelv-model checked statusboolean-
defaultValueinitial checked statusFunction-
varianttoogle color typeneutral, primary, secondary, accentneutral
sizetoogle sizexs, sm, md, lg-