Skip to content

Checkbox List

@astryxdesign/core v0.7.1 · CheckboxList

Notification preferences
Choose how you would like to be notified
  • Weekly digest every Monday
  • Instant alerts on your device
  • Standard messaging rates apply

Usage ​

CheckboxList is a field around a list of CheckboxListItem rows. With v-model, the value is the array of checked item values.

vue
<script setup lang="ts">
import { CheckboxList, CheckboxListItem } from '@astryx-vue/core/CheckboxList'
import { shallowRef } from 'vue'

const selected = shallowRef(['email'])
</script>

<template>
  <CheckboxList v-model="selected" label="Notifications">
    <CheckboxListItem label="Email" value="email" />
    <CheckboxListItem label="SMS" value="sms" />
  </CheckboxList>
</template>

Omit the bound value when a row owns its own checked state, such as a select-all row. Compact density uses the small checkbox. A checked row uses the accent-muted background. Read-only and disabled rows drop that background.

A read-only group keeps the checks and does not dim, but the checks cannot change. Disabled wins when both are set. When the group is disabled and a reason is set, every row stays focusable, and hovering or keyboard focus shows the reason. A row that is loading, or whose change is still running, shows a spinner inside the checkbox and cannot be toggled.

Anatomy

ElementDescription
GroupContainer for the labeled checkbox group.
Group labelText identifying what the checkbox options represent.
DescriptionHelper text below the group label.
Options listList containing the available checkbox options.
Option rowSelectable row containing one option.
CheckboxSelection indicator for an option.
Option labelPrimary content identifying an option.
Option descriptionSecondary text below an option label.
End contentCaller-provided content at the end of an option row.
SpinnerLoading indicator shown inside the pending checkbox.
Status messageError, warning, or success message below the group.

Best practices ​

GuidelinePractice
DoUse a select-all row without a value when the list itself is not the collection.
Don'tUse a checkbox list for mutually exclusive choices. Use RadioList.

Examples ​

Select all

Include in export

Select all is indeterminate until every document is included.

With end content

Add-on packages
  • Basic features included $0/mo
  • Advanced analytics and integrations $9/mo
  • Custom solutions and dedicated support Custom

Each row can end with a price badge.

Read-only, reason, and loading

Saved export
Managed export
  • Ask an administrator
  • Ask an administrator
Ask an administrator
Live export
  • Loading

Read-only keeps the checks and does not dim. A disabled group with a reason stays focusable. A loading row cannot be toggled.