The Checkbox component renders a checkbox input, which allows selecting one or more options from a group of options.

Usage

import { PlumaTestHelpers } from '@customerio/pluma-components/react/test-helpers/pluma-test-helpers'

const checkbox = PlumaTestHelpers.extract('Checkbox', screen.getByTestId('data-test-checkbox'));

Test Helpers

Clicks the checkbox

Checks if the checkbox is checked

Checks if the checkbox is disabled

Gets the label text of the checkbox

Gets the name attribute of the checkbox

Gets the value attribute of the checkbox

Whether the checkbox checked state matches the expected state

On this page