Koori UI
Components

GlassCheckbox

A glassmorphism-styled checkbox powered by Radix UI with optional label support.

Preview

Usage

import { GlassCheckbox } from "koori-ui";
 
<GlassCheckbox id="terms" label="I accept the terms and conditions" />

Without Label

<GlassCheckbox id="standalone" />

Controlled

import { useState } from "react";
import { GlassCheckbox } from "koori-ui";
 
function Example() {
  const [checked, setChecked] = useState(false);
  return (
    <GlassCheckbox
      id="controlled"
      checked={checked}
      onCheckedChange={(val) => setChecked(val === true)}
      label="Enable notifications"
    />
  );
}

Disabled

<GlassCheckbox id="disabled" disabled label="Disabled option" />

Props

PropTypeDefaultDescription
labelstringOptional label rendered next to the checkbox
idstringHTML id, links the label for accessibility
checkedboolean | "indeterminate"Controlled checked state
defaultCheckedbooleanInitial checked state (uncontrolled)
onCheckedChange(checked: boolean | "indeterminate") => voidCallback when state changes
disabledbooleanfalseDisables the checkbox

All Radix Checkbox.Root props are also accepted.

On this page