Modal 模态框
用于在当前页面上承载需要中断流程以进行确认或补充信息的内容。
变体
无遮罩
自定义内容
API
Modal Props
等价于
DialogProps | DrawerProps
Modal.Body Props
继承自
HTMLAttributes<HTMLDivElement>
| 属性名 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| children | 主体内容。 | ReactNode | - |
Modal.Footer Props
继承自
HTMLAttributes<HTMLDivElement>
| 属性名 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| children | 底部操作。 | ReactNode | - |
Modal.Header Props
继承自
HTMLAttributes<HTMLDivElement>
| 属性名 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| children | 头部内容。 | ReactNode | - |
Modal.Portal Props
继承自
Omit<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'aria-labelledby' | 'aria-describedby'>
| 属性名 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| children | 弹层内容。 | ReactNode | - |
| container | 挂载容器。 | Element | DocumentFragment | - |
| overlayless | 隐藏遮罩层。 | boolean | - |
| overlayClassName | 遮罩层类名。 | string | - |
| surfaceClassName | 主体类名。 | string | - |
Modal.Trigger Props
| 属性名 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| children | 触发元素。 | ReactNode | - |