Skip to content

Accessibility: Full

Translations: Not Needed

Checkbox

Atomic checkbox element

Unchecked

Vue
html
<template>
  <HLCheckbox id="unchecked-3xs" size="3xs" v-model:checked="value">Remember me - 3xs</HLCheckbox>
</template>
<script setup lang="ts">
  import { HLCheckbox } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const value = ref(false)
</script>

Checked

Vue
html
<template>
  <HLCheckbox id="checked-3xs" checked size="3xs">Remember me - 3xs</HLCheckbox>
</template>
<script setup lang="ts">
  import { HLCheckbox } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const value = ref(true)
</script>

Indeterminate

Vue
html
<template>
  <HLCheckbox id="indeterminate-3xs" indeterminate size="3xs">Remember me - 3xs</HLCheckbox>
</template>
<script setup lang="ts">
  import { HLCheckbox } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const value = ref(true)
</script>

Disabled - Unchecked

Vue
html
<template>
  <HLCheckbox id="disabled-unchecked-3xs" disabled size="3xs">Remember me - 3xs</HLCheckbox>
</template>
<script setup lang="ts">
  import { HLCheckbox } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const value = ref(true)
</script>

Disabled - Checked

Vue
html
<template>
  <HLCheckbox id="disabled-checked-3xs" disabled checked size="3xs">Remember me - 3xs</HLCheckbox>
</template>
<script setup lang="ts">
  import { HLCheckbox } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const value = ref(true)
</script>

Disabled - Indeterminate

Vue
html
<template>
  <HLCheckbox id="disabled-indeterminate-3xs" disabled indeterminate size="3xs">Remember me - 3xs</HLCheckbox>
</template>
<script setup lang="ts">
  import { HLCheckbox } from '@platform-ui/highrise'
  import { ref } from 'vue'
  const value = ref(true)
</script>

Imports

ts
import { HLCheckbox } from '@platform-ui/highrise'

Props

NameTypeDefaultDescription
id *string | undefinedundefinedThe unique identifier for the checkbox
checkedboolean | undefinedundefinedWhether the checkbox is checked
indeterminateboolean | undefinedundefinedWhether the checkbox is in an indeterminate state
disabledboolean | undefinedundefinedWhether the checkbox is disabled
size'lg' | 'md' | 'sm' | 'xs' | '2xs' | '3xs''md'The size of the checkbox

Emits

NameParametersDescription
@update:checked(value: boolean, event: Event) => voidWhen checkbox state changes

Slots

NameParametersDescription
default()The default content slot

Methods

NameTypeDescription
focus() => voidTriggered when checkbox gets focus
blur() => voidTriggered when checkbox loses focus