1e41f4b71Sopenharmony_ci# Shadow Effect 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ciYou can use the [shadow](../reference/apis-arkui/arkui-ts/ts-universal-attributes-image-effect.md#shadow)API to apply a shadow effect to a component. Even better, you can set the parameter of this API to [ShadowOptions](../reference/apis-arkui/arkui-ts/ts-universal-attributes-image-effect.md#shadowoptions) to customize the shadow effect. When the radius or color opacity in **ShadowOptions** is set to **0**, there is no shadow effect. 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci```ts 9e41f4b71Sopenharmony_ci@Entry 10e41f4b71Sopenharmony_ci@Component 11e41f4b71Sopenharmony_cistruct ShadowOptionDemo { 12e41f4b71Sopenharmony_ci build() { 13e41f4b71Sopenharmony_ci Row() { 14e41f4b71Sopenharmony_ci Column() { 15e41f4b71Sopenharmony_ci Column() { 16e41f4b71Sopenharmony_ci Text('shadowOption').fontSize(12) 17e41f4b71Sopenharmony_ci } 18e41f4b71Sopenharmony_ci .width(100) 19e41f4b71Sopenharmony_ci .aspectRatio(1) 20e41f4b71Sopenharmony_ci .margin(10) 21e41f4b71Sopenharmony_ci .justifyContent(FlexAlign.Center) 22e41f4b71Sopenharmony_ci .backgroundColor(Color.White) 23e41f4b71Sopenharmony_ci .borderRadius(20) 24e41f4b71Sopenharmony_ci .shadow({ radius: 10, color: Color.Gray }) 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci Column() { 27e41f4b71Sopenharmony_ci Text('shadowOption').fontSize(12) 28e41f4b71Sopenharmony_ci } 29e41f4b71Sopenharmony_ci .width(100) 30e41f4b71Sopenharmony_ci .aspectRatio(1) 31e41f4b71Sopenharmony_ci .margin(10) 32e41f4b71Sopenharmony_ci .justifyContent(FlexAlign.Center) 33e41f4b71Sopenharmony_ci .backgroundColor('#a8a888') 34e41f4b71Sopenharmony_ci .borderRadius(20) 35e41f4b71Sopenharmony_ci .shadow({ radius: 10, color: Color.Gray, offsetX: 20, offsetY: 20 }) 36e41f4b71Sopenharmony_ci } 37e41f4b71Sopenharmony_ci .width('100%') 38e41f4b71Sopenharmony_ci .height('100%') 39e41f4b71Sopenharmony_ci .justifyContent(FlexAlign.Center) 40e41f4b71Sopenharmony_ci } 41e41f4b71Sopenharmony_ci .height('100%') 42e41f4b71Sopenharmony_ci } 43e41f4b71Sopenharmony_ci} 44e41f4b71Sopenharmony_ci``` 45e41f4b71Sopenharmony_ci 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ci 48e41f4b71Sopenharmony_ci 49