콘텐츠로 이동
RefineUI

Checkbox

폼용 이진 선택 컨트롤.

Overview

Machine-readable contract from Component Spec.

component: checkboxexport: Checkboxversion: 1tokens.visual: checkboxattributes: data-refineui=checkbox

Anatomy

Partdata-refineui
rootcheckbox

Variants

AxisValues
variantdefault, circular

States

ScopeCategoryValues
componentenvironmentforced-colors, dir, prefers-contrast

Keyboard

KeyActionNative
Spaceactivatetrue

Layout

PropertyValue
directionlogical
rtltrue

Variant

Select a recipe variant — preview and Recipe → Tokens update together.

Recipe → Tokens

Slot bindings for variant="default" — declared in Checkbox/style → tokens.

SlotVariantPropertyTraceSemanticLight → foundationDark → foundationRecipe class
labelforegroundcheckbox.label.defaultforegroundPrimaryprimaryBlackneutralWhitetext-refineui-alias-foreground-primary
descriptionforegroundcheckbox.label.descriptionforegroundSecondaryneutral600neutral350text-refineui-alias-foreground-secondary
checkIconforegroundcheckbox.checkIcon.defaultforegroundInversedneutralWhiteprimaryBlacktext-refineui-alias-foreground-inversed

Component token trace

All paths in token-trace-v2.json prefixed with checkbox.

TraceSemanticLight foundationDark foundationLightDark
checkbox.checkIcon.defaultforegroundInversedneutralWhiteprimaryBlack#FFFFFF#212121
checkbox.checkIcon.disabledforegroundSecondaryneutral600neutral350#6C6C6C#D8D8D8
checkbox.label.defaultforegroundPrimaryprimaryBlackneutralWhite#212121#FFFFFF
checkbox.label.descriptionforegroundSecondaryneutral600neutral350#6C6C6C#D8D8D8
checkbox.label.disabledforegroundDisabledneutral400neutral600#CECECE#6C6C6C
npm install @refineui/react @refineui/tokens
import { Checkbox } from "@refineui/react";
<Checkbox label="Accept terms and conditions" />
<Checkbox
label="Enable notifications"
description="Receive updates about your account"
checked={notificationsEnabled}
onChange={(e) => setNotificationsEnabled(e.target.checked)}
/>
<Checkbox variant="circular" label="Circular variant" />
PropDefaultTypeDescription
labelstring체크박스 레이블 텍스트.
descriptionstring레이블 아래 선택적 설명.
variant"default""default" | "circular"시각적 변형 스타일.
checkedboolean제어형 체크 상태.
disabledfalseboolean인터랙션을 비활성화합니다.