The Checkbox component that follows the WAI-ARIA Checkbox Pattern.
import Checkbox from "@ds-kit/checkbox"
A basic example of an uncontrolled Checkbox component can look like this:
<> <Checkbox value="blue" text="blue" /> <Checkbox value="red" text="red" /> </>
<> <Checkbox checked={true} value="red" onChange={() => alert("click red")} text="red" /> <Checkbox checked={false} value="blue" onChange={() => alert("click blue")} text="blue" /> </>
state
bool
checked
bool
onChange
func
text
string
node