JGuang

CheckList

CheckList · Ant Design Mobile

Preview
npm install antd-mobile@5.43.0

CheckList

Checklist operation.

Install

npm install antd-mobile@5.43.0

antd-mobile is for mobile web, not React Native or Mini Programs. React 19 projects must register createRoot with unstableSetRender at the entry, or imperative APIs such as Toast and Dialog cannot render. Switch dark mode with <html data-prefers-color-scheme="dark">.

Examples come from the official Ant Design Mobile repository (MIT) at the commit published as npm 5.43.0. Presentation helpers such as DemoBlock are JGuang rewrites, not antd-mobile APIs.

Checklist operation.

When to Use

Select one or more of a set of list items.

The bottom layer of CheckList is implemented based on List, which is a list that can be checked.

Demos

CheckList

Props

NameDescriptionTypeDefault
activeIconThe icon displayed when selectedReactNode<CheckOutline />
extraThe right area of the list item(active: boolean) => ReactNode-
defaultValueThe default itemsstring[][]
disabledIs the check list disabledbooleanfalse
multipleWhether to allow multiple selection or notbooleanfalse
onChangeTriggered when the option changes(value: string[]) => void-
readOnlyIs the check list item readonlybooleanfalse
valueThe selected itemsstring[][]

In addition, the mode attribute of List is also supported

CSS Variables

The same as List

CheckList.Item

Props

NameDescriptionTypeDefault
disabledIs the check list item disabledbooleanfalse
readOnlyIs the check list item readonlybooleanfalse
valueThe option valuestring-

In addition, the following attributes of List.Item are also supported: title children description prefix onClick

CSS Variables

The same as List.Item