Empty
<Alert type="warning"> Empty has been deprecated and will be removed in the next major version. Please use ErrorBlock instead. </Alert>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.
Use the scene illustration to indicate that the content is empty.
When to Use
A placeholder prompt for when the information is empty.
Demos
Empty
Props
| Name | Description | Type | Default |
|---|---|---|---|
| description | The descriptive text below the image | ReactNode | - |
| image | Custom image, when it is string, it means image URL | ReactNode | - |
| imageStyle | The style of the image | CSSProperties | - |