Checkbox

A control that can be toggled on or off.
Properties
label
disabled
checked
Example
Source Code
Installation
"use client";

import React from "react";
import { Checkbox } from "@/subframe/components/Checkbox";

function CheckboxExample() {
  return (
    <Checkbox
      label="Label"
      disabled={false}
      checked={false}
      onCheckedChange={(checked: boolean) => {}}
    />
  );
}

export default CheckboxExample;

Props

Checkbox
Prop
Type
Default
Additional info
label
string
"Label"
disabled
boolean
false
checked
boolean
Checked state of the checkbox
onCheckedChange
(checked: boolean) => void
Handler called when the checked state of the checkbox changes.

Examples

Basics

Use checked and onCheckedChange props to control the checked state.

Label