React TriStateCheckbox

React TriStateCheckbox

·

1 min read

React TriStateCheckbox is used to select either "true", "false" or "null" as the value.

Setup

Refer to PrimeReact setup documentation for download and installation steps for your environment.

Import

import {TriStateCheckbox} from 'primereact/tristatecheckbox';

Getting Started

TriStateCheckbox is used as a controlled input with checked and onChange properties.

<TriStateCheckbox value={value} onChange={(e) => setValue(e.value)} />

Theming

TriStateCheckbox supports various themes featuring Material, Bootstrap, Fluent as well as your own custom themes via the Designer tool.

Resources

Visit the PrimeReact TriStateCheckbox showcase for demos and documentation.