Checkbox
An advanced animating component based on the input[type="checkbox"]
.
Demo
API
Component takes all input
related props given along with custom props below:
Props | Type | Required | Default | Description |
---|---|---|---|---|
color | String | false | "#2196f3" | Changes "checked" background color |
Example:
import { Checkbox, Button } from 'react-horcrux';
export default YourForm function() {
return(
<form onSubmit={doSomething}>
<label>
Ravenclaw
<Checkbox name="house" onChange={doSomething} />
</label>
<Button type="submit">do it</Button>
</form>
);
}