Checkbox

Controlled or uncontrolled checkbox with optional label.

Installation

npx dafink-ui add checkbox

Demo

Props

NameTypeDefaultDescription
labelstringundefinedText label rendered next to the checkbox.
idstringundefinedHTML id, links label to input.
checkedbooleanundefinedControlled checked state.
disabledbooleanfalseDisables the checkbox.
onChangeChangeEventHandler<HTMLInputElement>undefinedChange event handler.