Checkbox
import { Checkbox } from '@dr.pogodin/react-utils';
The Checkbox component implements checkboxes themed with React Themes.
Demo
A simple checkbox
Properties
checked
- boolean - Checkbox value.label
- string - Checkbox label.onChange
- function - State change handler.theme
- CheckboxTheme - Ad hoc React Themes theme.- Accepts other props of themed components.
CheckboxTheme
Valid theme keys are:
checkbox
- Applied to the underlying checkbox<input>
element.container
- Applied to the root checkbox element.label
- Applied the checkbox label element.
See React Themes documentation for details on visual component theming.
Examples
import React from 'react';
import { Checkbox } from '@dr.pogodin/react-utils';
export default function CheckboxExample() {
return (
<Checkbox label="A simple checkbox" />
);
}