Files
twenty/packages/twenty-docs/l/zh/twenty-ui/input/checkbox.mdx
T
github-actions[bot] 001c2097a3 i18n - docs translations (#18231)
Created by Github action

<!-- mintlify-editor-comments:start -->
Mintlify
---
0 threads from 0 users in Mintlify

- No unresolved comments
<!-- mintlify-editor-comments:end -->

<!-- mintlify-comment-->

<a
href="https://dashboard.mintlify.com/twenty/twenty/editor/i18n-docs?source=pr_comment"
target="_blank" rel="noopener noreferrer"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-light.svg"><img
src="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-light.svg"
alt="Open in Mintlify Editor"></picture></a>

<!-- /mintlify-comment -->

Co-authored-by: github-actions <github-actions@twenty.com>
2026-02-25 16:50:28 +01:00

51 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 复选框
image: /images/user-guide/tasks/tasks_header.png
---
<Frame>
<img src="/images/user-guide/tasks/tasks_header.png" alt="标题" />
</Frame>
用于用户需要从多个选项中选择多个值时。
<Tabs>
<Tab title="**用法**">
```jsx
import { Checkbox } from "twenty-ui/display";
export const MyComponent = () => {
return (
<Checkbox
checked={true}
indeterminate={false}
onChange={() => console.log("onChange function fired")}
onCheckedChange={() => console.log("onCheckedChange function fired")}
variant="primary"
size="small"
shape="squared"
/>
);
};
```
</Tab>
<Tab title="属性">
| 属性 | 类型 | 描述 |
| --------------- | --- | --------------------------------------------------- |
| 选中 | 布尔值 | 指示复选框是否被选中 |
| 不确定 | 布尔值 | 指示复选框是否处于不确定状态(既非选中也非未选中) |
| onChange | 函数 | 当复选框状态更改时需要触发的回调函数 |
| onCheckedChange | 函数 | 当`checked`状态更改时需要触发的回调函数 |
| 变体 | 字符串 | 盒子的视觉样式变体。 选项包括:`primary``secondary` 和 `tertiary` |
| 大小 | 字符串 | 复选框的大小。 有两个选项:`small` 和 `large` |
| 形状 | 字符串 | 复选框的形状。 有两个选项:`squared` 和 `rounded` |
</Tab>
</Tabs>