Skip to main content

ion-spinner

shadow

Spinner 组件提供了各种动画 SVG 旋转器。旋转图标是应用正在加载内容或执行用户需要等待的另一个进程的视觉指示器。

¥The Spinner component provides a variety of animated SVG spinners. Spinners are visual indicators that the app is loading content or performing another process that the user needs to wait on.

基本用法

¥Basic Usage

默认加载控件基于模式。当模式为 ios 时,加载控件将为 "lines",当模式为 md 时,加载控件将为 "circular"。如果设置了 name 属性,则将使用该加载控件而不是特定于模式的加载控件。

¥The default spinner is based on the mode. When the mode is ios the spinner will be "lines", and when the mode is md the spinner will be "circular". If the name property is set, then that spinner will be used instead of the mode specific spinner.

主题化

¥Theming

颜色

¥Colors

样式

¥Styling

你可以使用自定义 CSS 来设置加载控件的样式。例如,你可以通过设置宽度和高度来调整加载控件的大小。

¥You may use custom CSS to style the spinner. For example, you can resize the spinner by setting the width and height.

CSS 自定义属性

¥CSS Custom Properties

属性

¥Properties

color

DescriptionThe color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
Attributecolor
Type"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
Defaultundefined

duration

DescriptionDuration of the spinner animation in milliseconds. The default varies based on the spinner.
Attributeduration
Typenumber | undefined
Defaultundefined

name

DescriptionThe name of the SVG spinner to use. If a name is not provided, the platform's default spinner will be used.
Attributename
Type"bubbles" | "circles" | "circular" | "crescent" | "dots" | "lines" | "lines-sharp" | "lines-sharp-small" | "lines-small" | undefined
Defaultundefined

paused

DescriptionIf true, the spinner's animation will be paused.
Attributepaused
Typeboolean
Defaultfalse

事件

¥Events

No events available for this component.

方法

¥Methods

No public methods available for this component.

CSS 阴影部分

¥CSS Shadow Parts

No CSS shadow parts available for this component.

CSS 自定义属性

¥CSS Custom Properties

NameDescription
--colorColor of the spinner

插槽

¥Slots

No slots available for this component.