Components

Checkbox

v1.0.0

Checkbox control with label support.

Import

import { Checkbox } from '@meteorack/sdk-react';

How To Use It

  • Use it for opt-in settings and independent boolean choices that can be toggled without affecting other fields.
  • Prefer checkboxes over switches when the user is reviewing several saved settings in a form and will commit them together.

Works Well With

Props

checked?: boolean

Current checked state.

onChange?: (checked: boolean) => void

Called when the checked state changes.

label?: string

Optional clickable label rendered next to the checkbox.

disabled?: boolean

Disables interaction and reduces emphasis.

className?: string

Optional class name for the checkbox wrapper.

Example

Checkbox.tsx
import { useState } from 'react';
import { Checkbox } from '@meteorack/sdk-react';

export function MarketingOptInField() {
  const [checked, setChecked] = useState(false);

  return (
    <Checkbox
      checked={checked}
      onChange={setChecked}
      label="Email me about product updates"
    />
  );
}