ts-basic-components-loadingprogress.md 959 字节
Newer Older
1 2
# LoadingProgress

E
ester.zhou 已提交
3 4 5 6 7
The **\<LoadingProgress>** component is used to create a loading animation.

>  **NOTE**
>
>  This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
8 9 10 11 12 13


## Required Permissions

None

E
ester.zhou 已提交
14

15 16 17 18
## Child Components

None

E
ester.zhou 已提交
19

20 21 22 23 24 25
## APIs

LoadingProgress()

Creates a **LoadingProgress** instance.

E
ester.zhou 已提交
26 27


28 29
## Attributes

E
ester.zhou 已提交
30 31 32 33 34
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| color | [ResourceColor](../../ui/ts-types.md) | - | Foreground color of the loading progress bar.|


35 36 37

## Example

E
ester.zhou 已提交
38 39
```ts
// xxx.ets
40 41 42 43 44 45 46 47 48 49 50 51 52
@Entry
@Component
struct LoadingProgressExample {
  build() {
    Column({ space: 5 }) {
      Text('Orbital LoadingProgress ').fontSize(9).fontColor(0xCCCCCC).width('90%')
      LoadingProgress()
        .color(Color.Blue)
    }.width('100%').margin({ top: 5 })
  }
}
```

E
ester.zhou 已提交
53
![en-us_image_000000111864201](figures/en-us_image_000000111864201.gif)