Skip to content

Checkbox ​

Standalone checkbox for single yes/no confirmation (e.g. accept terms). For groups of checkboxes, use Checkbox Group.

Demo ​

Basic

Ikke accepteret

With help text

Disabled

Installation ​

vue
<script setup>
import { GTCheckbox } from '@grundtone/vue';
</script>

Usage ​

vue
<GTCheckbox v-model="accepted" label="Jeg accepterer vilkårene" />
<GTCheckbox v-model="newsletter" label="Modtag nyhedsbrev"
  help-text="Vi sender maks én email om ugen" />

Props ​

PropTypeDefaultDescription
modelValuebooleanfalseChecked state (v-model)
labelstring—Label text
helpTextstring—Help text below label
disabledbooleanfalseDisabled state
namestring—HTML name attribute
idstringautoHTML id

Events ​

EventPayloadDescription
update:modelValuebooleanEmitted on toggle