You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
463 B

---
order: 0
title:
zh-CN: 基本用法
en-US: Basic
---
10 years ago
## zh-CN
10 years ago
简单的 checkbox。
## en-US
Basic usage of checkbox.
```tsx
import { Checkbox } from 'antd';
import type { CheckboxChangeEvent } from 'antd/es/checkbox';
import React from 'react';
const onChange = (e: CheckboxChangeEvent) => {
console.log(`checked = ${e.target.checked}`);
};
10 years ago
const App: React.FC = () => <Checkbox onChange={onChange}>Checkbox</Checkbox>;
export default App;
```