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)
labelstringLabel text
helpTextstringHelp text below label
disabledbooleanfalseDisabled state
namestringHTML name attribute
idstringautoHTML id

Events

EventPayloadDescription
update:modelValuebooleanEmitted on toggle