About
A square checkbox with a quiet indeterminate (mixed) state, label and secondary hint text, for forms that need an explicit opt-in or a parent "select all" control.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds ZCheckbox to your project and fits it to your theme.
Code
How ZCheckbox is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import ZCheckbox from "@/components/ui/zcheckbox";
export default function ZCheckboxSizesDemo() {
const [sm, setSm] = React.useState(false);
const [md, setMd] = React.useState(false);
const [lg, setLg] = React.useState(false);
return (
<div className="flex flex-col gap-3">
<ZCheckbox
size="sm"
checked={sm}
onCheckedChange={setSm}
label="记录请求日志"
/>
<ZCheckbox
size="md"
checked={md}
onCheckedChange={setMd}
label="记录请求日志"
hint="日志保留 7 天"
/>
<ZCheckbox
size="lg"
checked={lg}
onCheckedChange={setLg}
label="记录请求日志"
hint="日志保留 7 天,包含请求体"
/>
</div>
);
}










