FSAI Design System
Components

Checkbox

Checkbox control for selection lists, permissions, and partial multi-select state.

Overview

Checkbox is the shared checkbox control used across the platform for:

  • DataTable selection
  • row selection
  • permission toggles
  • multi-select lists
  • partial or indeterminate selection state

It wraps CheckboxPrimitive and adds optional label support.

DataTable Selection Pattern

One of the most important Checkbox patterns in the system is DataTable selection.

The same control is used for:

  • top-level select-all
  • group-level select-all
  • individual row selection
  • disabled placeholder cells in skeleton and non-interactive states
<Checkbox
  checked={isTopLevelChecked}
  onChange={handleTopLevelCheckboxClick}
/>

In practice, this is one of the clearest reference implementations for how Checkbox behaves across list-heavy dashboard UI.

Basic Usage

<Checkbox
  label="Allow attendees to invite others"
  checked={value}
  onChange={onChange}
/>

Partial Checked State

Use partialChecked for select-all controls when some, but not all, child items are selected.

<Checkbox
  partialChecked={selectedConversationIds.length > 0}
  checked={conversations.every((c) => selectedConversationIds.includes(c.id))}
  onChange={handleToggleAll}
/>

This is the pattern used in ChatOverview.tsx.

Inside Clickable Rows

By default, the checkbox prevents click propagation. Use allowPropagation only when the parent row also needs the event.

<Checkbox
  checked={isSelected}
  onChange={onSelectionChange}
  allowPropagation
/>

Props

PropTypeDefaultDescription
checkedbooleanWhether the checkbox is checked.
partialCheckedbooleanShows the indeterminate-style partial state.
onChange(checked: boolean) => voidCalled when the checkbox changes.
classNamestringAdditional classes passed to the primitive.
disabledbooleanDisables interaction.
labelstringOptional label text.
allowPropagationbooleanfalseAllows click events to bubble to a clickable parent.
size'md' | 'sm''md'Checkbox size.

Checkbox Primitive

CheckboxPrimitive is the low-level control used internally by Checkbox.

Use it directly only when you need a custom row or card layout without the standard label wrapper. In normal product code, prefer Checkbox.

Brand Dashboard Usage

PatternPathNotes
Shared DataTable header selectionfsai/packages/shared-ui/src/components/DataTable/table/DataTableTableView.tsxCanonical select-all checkbox usage in the shared table system.
Shared DataTable row selectionfsai/packages/shared-ui/src/components/DataTable/table/DataTableItems.tsxCanonical row-level selection and disabled placeholder usage.
Shared DataTable group selectionfsai/packages/shared-ui/src/components/DataTable/group/DataTableGroup.tsxGroup-level checkbox selection in grouped table views.
Table or list select-allfsai/apps/brand-dashboard/src/pages/Home/ChatOverview/ChatOverview.tsxUses partialChecked for mixed selection state.
Dense row selectionfsai/apps/brand-dashboard/src/pages/Territories/DealZonesSidebar.tsxCheckbox used inside clickable list rows.
Field-style permissionsfsai/apps/brand-dashboard/src/pages/Home/Calendar/CalendarEventInformation/CalendarEventForm.tsxMultiple independent permission toggles.
Multi-select file-type filtersfsai/apps/brand-dashboard/src/pages/PortalEditor/ApplicantPortalEditor/PortalStepUpsert/components/ActionFieldsSwitcher/UploadActionField.tsxCheckbox list for multiple selected values.

Choosing Between Checkbox, Toggle, And Radio

  • Use Checkbox for membership in a set or multiple independent true/false options.
  • Use Toggle for a single on/off setting.
  • Use Radio when only one option may be chosen.

Guidelines

  • Do use partialChecked for select-all or hierarchical selection UI
  • Do look at DataTable first when you need a canonical checkbox selection pattern
  • Do use allowPropagation only when the checkbox lives inside another clickable surface
  • Do prefer Checkbox over Toggle for multi-select lists
  • Don't use Checkbox when the interaction is really a mutually exclusive choice

On this page