块编辑器开发文档

💡 云策文档标注

概述

Spinner 是一个 WordPress 组件,用于在用户操作处理过程中提供视觉反馈,表示请求正在处理且即将完成。

关键要点

  • Spinner 组件用于通知用户其操作正在被处理。
  • 通过导入 @wordpress/components 中的 Spinner 来使用。
  • 最佳实践是确保 Spinner 能有效传达处理状态,并参考 Storybook 页面进行视觉探索。

代码示例

import { Spinner } from '@wordpress/components';

function Example() {
    return <Spinner />;
}

📄 原文内容

Spinner is a component used to notify users that their action is being processed.

Usage

import { Spinner } from '@wordpress/components';

function Example() {
    return <Spinner />;
}

Best practices

The spinner component should:

  • Signal to users that the processing of their request is underway and will soon complete.

Check out the Storybook page for a visual exploration of this component.