1e41f4b71Sopenharmony_ci# Foreground Effect 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciYou can apply different visual effects to foreground subjects. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> This feature is supported since API version 12. Updates will be marked with a superscript to indicate their earliest API version. 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci## foregroundEffect 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ciforegroundEffect(options: ForegroundEffectOptions) 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ciSets the foreground effect of the component. 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12. 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci**Parameters** 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 22e41f4b71Sopenharmony_ci| ------ | ------------------------------------------------------------ | ---- | ---------------------------------------------------- | 23e41f4b71Sopenharmony_ci| options | [ForegroundEffectOptions](#foregroundeffectoptions12) | Yes | Foreground effect settings, including the blur radius.| 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci## ForegroundEffectOptions<sup>12+</sup> 26e41f4b71Sopenharmony_ciDescribes the foreground effect. 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12. 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 33e41f4b71Sopenharmony_ci| ---- | ---- | ---- | -------------------------- | 34e41f4b71Sopenharmony_ci| radius | number | Yes | Blur radius.<br>Value range: [0, +∞)<br>Default value: **0**<br> This parameter takes effect only within the component scope. When it is used with other APIs, the effect beyond the component scope does not apply. | 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci## Example 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ciThis example shows the usage of **foregroundEffect**. 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci```ts 41e41f4b71Sopenharmony_ci// xxx.ets 42e41f4b71Sopenharmony_ci@Entry 43e41f4b71Sopenharmony_ci@Component 44e41f4b71Sopenharmony_cistruct Index { 45e41f4b71Sopenharmony_ci build() { 46e41f4b71Sopenharmony_ci Row() { 47e41f4b71Sopenharmony_ci Image($r('app.media.icon')) 48e41f4b71Sopenharmony_ci .width(100) 49e41f4b71Sopenharmony_ci .height(100) 50e41f4b71Sopenharmony_ci .foregroundEffect({ radius: 20 }) 51e41f4b71Sopenharmony_ci } 52e41f4b71Sopenharmony_ci .width('100%') 53e41f4b71Sopenharmony_ci .height('100%') 54e41f4b71Sopenharmony_ci .justifyContent(FlexAlign.Center) 55e41f4b71Sopenharmony_ci } 56e41f4b71Sopenharmony_ci} 57e41f4b71Sopenharmony_ci``` 58e41f4b71Sopenharmony_ci 59e41f4b71Sopenharmony_ciBelow is how the component looks with the foreground effect applied. 60e41f4b71Sopenharmony_ci**radius** indicates the blur radius. A larger value creates a more blurred effect. 61e41f4b71Sopenharmony_ci 62e41f4b71Sopenharmony_ci 63