Checkbox is a type of control component that allows user to select one or more options from a set. They can also be used alone to switch between on and off.
Checkbox UI and state management are separated so that you can swap in any form or state code you like.
Loading...
Live Code
functionBasicCheckbox(){const[isChecked, setIsChecked]=useState(false);return(<Checkboxvalue="newsletter"onChange={(e)=>setIsChecked(e.target.checked)}checked={isChecked}> Subscribe to newsletter</Checkbox>);}