EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
CheckboxList·component·@astryxdesign/core

Checkbox List Item

Individual checkbox item with label, description, and end content slot. Works in collection mode (inside CheckboxList) or standalone mode (inside List).

Open in Playground @astryxdesign/core/CheckboxList

Showcases and examples

2 documented examples

Checkbox List Item

Checkbox list items with labels, descriptions, and different states including disabled.

Preview loads on approachPreview loads on approach
Exact source · checkbox-list-item-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {useState} from 'react';
import {CheckboxList, CheckboxListItem} from '@astryxdesign/core/CheckboxList';

export default function CheckboxListItemShowcase() {
  const [value, setValue] = useState<string[]>(['updates', 'security']);

  return (
    <CheckboxList
      label="Email preferences"
      value={value}
      onChange={setValue}
      hasDividers>
      <CheckboxListItem
        label="Product updates"
        value="updates"
        description="New features and improvements"
      />
      <CheckboxListItem
        label="Security alerts"
        value="security"
        description="Important account security notifications"
      />
      <CheckboxListItem
        label="Marketing"
        value="marketing"
        description="Tips, offers, and promotions"
      />
      <CheckboxListItem
        label="Beta program"
        value="beta"
        description="Currently closed to new members"
        isDisabled
      />
    </CheckboxList>
  );
}

Usage

Individual checkbox item with label, description, and end content slot. Works in collection mode (inside CheckboxList) or standalone mode (inside List).

Typed props

PropType and behavior
labelReactNode · required
Primary text label for the item. Rich labels may contain links or buttons, which keep their own behavior without toggling the item. A ReactNode label names the checkbox from its visible text; pass aria-label only when that text is absent, or include all visible label words in the override.
aria-labelstring
Plain-text accessible name for the checkbox, replacing the one derived from label. Applied to the checkbox control. Use it when a rich label has no visible text; otherwise the value must retain every visible label word.
valuestring
Identity key (required inside CheckboxList).
descriptionReactNode
Secondary content below the label. String or ReactNode. Exposed as the checkbox's accessible description through aria-describedby, so assistive technology can tell it is the explanation for that choice.
endContentReactNode
Content rendered after the label area.
Slot: Icon, Badge
isDisabledboolean · default false
Whether this individual item is disabled.
isLoadingboolean · default false
Whether this item is loading. Shows a spinner inside the checkbox and blocks interaction on this item. In collection mode, the toggled item also shows this automatically while the parent changeAction is pending.
isCheckedboolean | 'indeterminate'
Direct checked state (standalone mode only).
onCheck(checked: boolean) => void
Direct check handler (standalone mode only).