Skip to content
On this page

Checkbox

js
import Checkbox from "@/components/Checkbox";

const Example = () => {
  const [checked, setChecked] = useState(false);
  return (
    <div>
      <Checkbox
        label="Checked"
        value={checked}
        onChange={() => setChecked(!checked)}
      />
    </div>
  );
};

TIP

You can use html checkbox attribute via props. For example: name="tc", value="1" You can also use label props for label text.

COPYRIGHT © 2022 Codeshaper, All rights reserved.