1e41f4b71Sopenharmony_ci# SymbolGlyph
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciThe **SymbolGlyph** component represents a symbol glyph.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci>  **NOTE**
6e41f4b71Sopenharmony_ci>
7e41f4b71Sopenharmony_ci>  This component is supported since API version 11. Updates will be marked with a superscript to indicate their earliest API version.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci## Child Components
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ciNot supported
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci## APIs
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ciSymbolGlyph(value?: Resource)
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci**Parameters**
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description|
26e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
27e41f4b71Sopenharmony_ci| value | [Resource](ts-types.md#resource)| No| Resource of the **SymbolGlyph** component, for example, **$r('sys.symbol.ohos_wifi')**.|
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci>  **NOTE**
30e41f4b71Sopenharmony_ci>
31e41f4b71Sopenharmony_ci>  The resources referenced in **$r('sys.symbol.ohos_wifi')** are preset in the system. The **SymbolGlyph** component supports only the preset symbol resources. If unsupported resources are referenced, an exception occurs.
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci## Attributes
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ciThe [universal attributes](ts-universal-attributes-size.md) are supported. With regard to text attributes, only the following attributes are supported.
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci### fontColor
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_cifontColor(value: Array<ResourceColor>)
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ciSets the color of the **SymbolGlyph** component.
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci**Parameters**
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
52e41f4b71Sopenharmony_ci| ------ | ---- | ---- | ----- |
53e41f4b71Sopenharmony_ci| value  | Array\<[ResourceColor](ts-types.md#resourcecolor)\> | Yes  | Color of the **SymbolGlyph** component.<br> Default value: depending on the rendering strategy|
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ci### fontSize
56e41f4b71Sopenharmony_ci
57e41f4b71Sopenharmony_cifontSize(value: number | string | Resource)
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ciSets the size of the **SymbolGlyph** component.
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ciThe display size of the symbol glyph is controlled by the **fontSize** setting. Once **width** or **height** is specified, other universal attributes will only affect the size of the component's placeholder, not the symbol glyph itself.
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
68e41f4b71Sopenharmony_ci
69e41f4b71Sopenharmony_ci**Parameters**
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
72e41f4b71Sopenharmony_ci| ------ | ---- | ---- | ----- |
73e41f4b71Sopenharmony_ci| value  | number \| string \| [Resource](ts-types.md#resource) | Yes  | Size of the **SymbolGlyph** component.<br>Default value: system default value|
74e41f4b71Sopenharmony_ci
75e41f4b71Sopenharmony_ci### fontWeight
76e41f4b71Sopenharmony_ci
77e41f4b71Sopenharmony_cifontWeight(value: number | FontWeight | string)
78e41f4b71Sopenharmony_ci
79e41f4b71Sopenharmony_ciSets the font weight of the **SymbolGlyph** component. For the number type, the value ranges from 100 to 900, at an interval of 100. A larger value indicates a heavier font weight. The default value is **400**. For the string type, only strings of the number type are supported, for example, **"400"**, **"bold"**, **"bolder"**, **"lighter"**, **"regular"**, and **"medium"**, which correspond to the enumerated values in **FontWeight**.
80e41f4b71Sopenharmony_ci
81e41f4b71Sopenharmony_ciThe **sys.symbol.ohos_lungs** icon does not support font weight setting.
82e41f4b71Sopenharmony_ci
83e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
84e41f4b71Sopenharmony_ci
85e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
86e41f4b71Sopenharmony_ci
87e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
88e41f4b71Sopenharmony_ci
89e41f4b71Sopenharmony_ci**Parameters**
90e41f4b71Sopenharmony_ci
91e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
92e41f4b71Sopenharmony_ci| ------ | ---- | ---- | ----- |
93e41f4b71Sopenharmony_ci| value  | number \| string \| [FontWeight](ts-appendix-enums.md#fontweight) | Yes  | Font weight of the **SymbolGlyph** component.<br>Default value: **FontWeight.Normal**|
94e41f4b71Sopenharmony_ci
95e41f4b71Sopenharmony_ci### renderingStrategy
96e41f4b71Sopenharmony_ci
97e41f4b71Sopenharmony_cirenderingStrategy(value: SymbolRenderingStrategy)
98e41f4b71Sopenharmony_ci
99e41f4b71Sopenharmony_ciSets the rendering strategy of the **SymbolGlyph** component.
100e41f4b71Sopenharmony_ci
101e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
102e41f4b71Sopenharmony_ci
103e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
104e41f4b71Sopenharmony_ci
105e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
106e41f4b71Sopenharmony_ci
107e41f4b71Sopenharmony_ci**Parameters**
108e41f4b71Sopenharmony_ci
109e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
110e41f4b71Sopenharmony_ci| ------ | ---- | ---- | ----- |
111e41f4b71Sopenharmony_ci| value  | [SymbolRenderingStrategy](#symbolrenderingstrategy11) | Yes  | Rendering strategy of the **SymbolGlyph** component.<br>Default value: **SymbolRenderingStrategy.SINGLE**|
112e41f4b71Sopenharmony_ci
113e41f4b71Sopenharmony_ciThe figure below shows the effects of different rendering strategies.
114e41f4b71Sopenharmony_ci
115e41f4b71Sopenharmony_ci![renderingStrategy](figures/renderingStrategy.png)
116e41f4b71Sopenharmony_ci
117e41f4b71Sopenharmony_ci### effectStrategy
118e41f4b71Sopenharmony_ci
119e41f4b71Sopenharmony_cieffectStrategy(value: SymbolEffectStrategy)
120e41f4b71Sopenharmony_ci
121e41f4b71Sopenharmony_ciSets the effect strategy of the **SymbolGlyph** component.
122e41f4b71Sopenharmony_ci
123e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
124e41f4b71Sopenharmony_ci
125e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
126e41f4b71Sopenharmony_ci
127e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
128e41f4b71Sopenharmony_ci
129e41f4b71Sopenharmony_ci**Parameters**
130e41f4b71Sopenharmony_ci
131e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
132e41f4b71Sopenharmony_ci| ------ | ---- | ---- | ----- |
133e41f4b71Sopenharmony_ci| value  | [SymbolEffectStrategy](#symboleffectstrategy11) | Yes  | Effect strategy of the **SymbolGlyph** component.<br>Default value: **SymbolEffectStrategy.NONE**|
134e41f4b71Sopenharmony_ci
135e41f4b71Sopenharmony_ci### symbolEffect<sup>12+</sup>
136e41f4b71Sopenharmony_ci
137e41f4b71Sopenharmony_cisymbolEffect(symbolEffect: SymbolEffect, isActive?: boolean)
138e41f4b71Sopenharmony_ci
139e41f4b71Sopenharmony_ciSets the symbol effect and effect state for the **SymbolGlyph** component.
140e41f4b71Sopenharmony_ci
141e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
142e41f4b71Sopenharmony_ci
143e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
144e41f4b71Sopenharmony_ci
145e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
146e41f4b71Sopenharmony_ci
147e41f4b71Sopenharmony_ci**Parameters**
148e41f4b71Sopenharmony_ci
149e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
150e41f4b71Sopenharmony_ci| ------ | ---- | ---- | ----- |
151e41f4b71Sopenharmony_ci| symbolEffect  | [SymbolEffect](#symboleffect12) | Yes  | Symbol effect of the **SymbolGlyph** component.<br>Default value: [SymbolEffect](#symboleffect12) |
152e41f4b71Sopenharmony_ci| isActive  | boolean | No  | Whether the effect is active.<br>Default value: **false**|
153e41f4b71Sopenharmony_ci
154e41f4b71Sopenharmony_ci### symbolEffect<sup>12+</sup>
155e41f4b71Sopenharmony_ci
156e41f4b71Sopenharmony_cisymbolEffect(symbolEffect: SymbolEffect, triggerValue?: number)
157e41f4b71Sopenharmony_ci
158e41f4b71Sopenharmony_ciSets the symbol effect and effect trigger for the **SymbolGlyph** component.
159e41f4b71Sopenharmony_ci
160e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
161e41f4b71Sopenharmony_ci
162e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
163e41f4b71Sopenharmony_ci
164e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
165e41f4b71Sopenharmony_ci
166e41f4b71Sopenharmony_ci**Parameters**
167e41f4b71Sopenharmony_ci
168e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
169e41f4b71Sopenharmony_ci| ------ | ---- | ---- | ----- |
170e41f4b71Sopenharmony_ci| symbolEffect | [SymbolEffect](#symboleffect12) | Yes  | Symbol effect of the **SymbolGlyph** component.<br>Default value: [SymbolEffect](#symboleffect12) |
171e41f4b71Sopenharmony_ci| triggerValue | number | No  | Value that, when changed, initiates the animation of the **SymbolGlyph** component.<br>To prevent the motion effect from triggering initially, set it to **-1**.|
172e41f4b71Sopenharmony_ci
173e41f4b71Sopenharmony_ci>  **NOTE**
174e41f4b71Sopenharmony_ci>
175e41f4b71Sopenharmony_ci>  When configuring the symbol effect, use the **effectStrategy** attribute or a single **symbolEffect** attribute. Mixing multiple effect attributes is not allowed.
176e41f4b71Sopenharmony_ci
177e41f4b71Sopenharmony_ci## SymbolEffect<sup>12+</sup>
178e41f4b71Sopenharmony_ci
179e41f4b71Sopenharmony_ciDefines the **SymbolEffect** class.
180e41f4b71Sopenharmony_ci
181e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
182e41f4b71Sopenharmony_ci
183e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
184e41f4b71Sopenharmony_ci
185e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
186e41f4b71Sopenharmony_ci
187e41f4b71Sopenharmony_ci### constructor<sup>12+</sup>
188e41f4b71Sopenharmony_ci
189e41f4b71Sopenharmony_ciconstructor()
190e41f4b71Sopenharmony_ci
191e41f4b71Sopenharmony_ciA constructor used to create a **SymbolEffect** instance, which is not animated.
192e41f4b71Sopenharmony_ci
193e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
194e41f4b71Sopenharmony_ci
195e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
196e41f4b71Sopenharmony_ci
197e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
198e41f4b71Sopenharmony_ci
199e41f4b71Sopenharmony_ci## ScaleSymbolEffect<sup>12+</sup>
200e41f4b71Sopenharmony_ci
201e41f4b71Sopenharmony_ciInherits from **SymbolEffect**.
202e41f4b71Sopenharmony_ci
203e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
204e41f4b71Sopenharmony_ci
205e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
206e41f4b71Sopenharmony_ci
207e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
208e41f4b71Sopenharmony_ci
209e41f4b71Sopenharmony_ci### Attributes
210e41f4b71Sopenharmony_ci
211e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
212e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
213e41f4b71Sopenharmony_ci| scope     | [EffectScope](#effectscope12)  |  No  | Effect scope.<br>Default value: **EffectScope.LAYER**   |
214e41f4b71Sopenharmony_ci| direction | [EffectDirection](#effectdirection12) |  No  | Effect direction.<br>Default value: **EffectDirection.DOWN**|
215e41f4b71Sopenharmony_ci
216e41f4b71Sopenharmony_ci### constructor<sup>12+</sup>
217e41f4b71Sopenharmony_ci
218e41f4b71Sopenharmony_ciconstructor(scope?: EffectScope, direction?: EffectDirection)
219e41f4b71Sopenharmony_ci
220e41f4b71Sopenharmony_ciA constructor used to create a **ScaleSymbolEffect** instance, which comes with a scaling animation effect.
221e41f4b71Sopenharmony_ci
222e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
223e41f4b71Sopenharmony_ci
224e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
225e41f4b71Sopenharmony_ci
226e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
227e41f4b71Sopenharmony_ci
228e41f4b71Sopenharmony_ci**Parameters**
229e41f4b71Sopenharmony_ci
230e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
231e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
232e41f4b71Sopenharmony_ci| scope     | [EffectScope](#effectscope12)         | No  | Effect scope.<br>Default value: **EffectScope.LAYER**   |
233e41f4b71Sopenharmony_ci| direction | [EffectDirection](#effectdirection12) | No  | Effect direction.<br>Default value: **EffectDirection.DOWN**|
234e41f4b71Sopenharmony_ci
235e41f4b71Sopenharmony_ci## HierarchicalSymbolEffect<sup>12+</sup>
236e41f4b71Sopenharmony_ci
237e41f4b71Sopenharmony_ciInherits from **SymbolEffect**.
238e41f4b71Sopenharmony_ci
239e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
240e41f4b71Sopenharmony_ci
241e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
242e41f4b71Sopenharmony_ci
243e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
244e41f4b71Sopenharmony_ci
245e41f4b71Sopenharmony_ci### Attributes
246e41f4b71Sopenharmony_ci
247e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
248e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
249e41f4b71Sopenharmony_ci| fillStyle | [EffectFillStyle](#effectfillstyle12) | No  | Effect fill style.<br>Default value: **EffectFillStyle.CUMULATIVE**|
250e41f4b71Sopenharmony_ci
251e41f4b71Sopenharmony_ci### constructor<sup>12+</sup>
252e41f4b71Sopenharmony_ci
253e41f4b71Sopenharmony_ciconstructor(fillStyle?: EffectFillStyle)
254e41f4b71Sopenharmony_ci
255e41f4b71Sopenharmony_ciA constructor used to create a **HierarchicalSymbolEffect** instance, which comes with a hierarchical animation effect.
256e41f4b71Sopenharmony_ci
257e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
258e41f4b71Sopenharmony_ci
259e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
260e41f4b71Sopenharmony_ci
261e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
262e41f4b71Sopenharmony_ci
263e41f4b71Sopenharmony_ci**Parameters**
264e41f4b71Sopenharmony_ci
265e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
266e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
267e41f4b71Sopenharmony_ci| fillStyle | [EffectFillStyle](#effectfillstyle12) | No  | Effect fill style.<br>Default value: **EffectFillStyle.CUMULATIVE**|
268e41f4b71Sopenharmony_ci
269e41f4b71Sopenharmony_ci## AppearSymbolEffect<sup>12+</sup>
270e41f4b71Sopenharmony_ci
271e41f4b71Sopenharmony_ciInherits from **SymbolEffect**.
272e41f4b71Sopenharmony_ci
273e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
274e41f4b71Sopenharmony_ci
275e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
276e41f4b71Sopenharmony_ci
277e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
278e41f4b71Sopenharmony_ci
279e41f4b71Sopenharmony_ci### Attributes
280e41f4b71Sopenharmony_ci
281e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
282e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
283e41f4b71Sopenharmony_ci| scope | [EffectScope](#effectscope12) | No  | Effect scope.<br>Default value: **EffectScope.LAYER**|
284e41f4b71Sopenharmony_ci
285e41f4b71Sopenharmony_ci### constructor<sup>12+</sup>
286e41f4b71Sopenharmony_ci
287e41f4b71Sopenharmony_ciconstructor(scope?: EffectScope)
288e41f4b71Sopenharmony_ci
289e41f4b71Sopenharmony_ciA constructor used to create an **AppearSymbolEffect** instance, which comes with an appear animation effect.
290e41f4b71Sopenharmony_ci
291e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
292e41f4b71Sopenharmony_ci
293e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
294e41f4b71Sopenharmony_ci
295e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
296e41f4b71Sopenharmony_ci
297e41f4b71Sopenharmony_ci**Parameters**
298e41f4b71Sopenharmony_ci
299e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
300e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
301e41f4b71Sopenharmony_ci| scope  | [EffectScope](#effectscope12) | No  | Effect scope.<br>Default value: **EffectScope.LAYER**|
302e41f4b71Sopenharmony_ci
303e41f4b71Sopenharmony_ci## DisappearSymbolEffect<sup>12+</sup>
304e41f4b71Sopenharmony_ci
305e41f4b71Sopenharmony_ciInherits from **SymbolEffect**.
306e41f4b71Sopenharmony_ci
307e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
308e41f4b71Sopenharmony_ci
309e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
310e41f4b71Sopenharmony_ci
311e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
312e41f4b71Sopenharmony_ci
313e41f4b71Sopenharmony_ci### Attributes
314e41f4b71Sopenharmony_ci
315e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
316e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
317e41f4b71Sopenharmony_ci| scope | [EffectScope](#effectscope12) | No  | Effect scope.<br>Default value: **EffectScope.LAYER**|
318e41f4b71Sopenharmony_ci
319e41f4b71Sopenharmony_ci### constructor<sup>12+</sup>
320e41f4b71Sopenharmony_ci
321e41f4b71Sopenharmony_ciconstructor(scope?: EffectScope)
322e41f4b71Sopenharmony_ci
323e41f4b71Sopenharmony_ciA constructor used to create a **DisappearSymbolEffect** instance, which comes with a disappear animation effect.
324e41f4b71Sopenharmony_ci
325e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
326e41f4b71Sopenharmony_ci
327e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
328e41f4b71Sopenharmony_ci
329e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
330e41f4b71Sopenharmony_ci
331e41f4b71Sopenharmony_ci**Parameters**
332e41f4b71Sopenharmony_ci
333e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
334e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
335e41f4b71Sopenharmony_ci| scope  | [EffectScope](#effectscope12) | No  | Effect scope.<br>Default value: **EffectScope.LAYER**|
336e41f4b71Sopenharmony_ci
337e41f4b71Sopenharmony_ci## BounceSymbolEffect<sup>12+</sup>
338e41f4b71Sopenharmony_ci
339e41f4b71Sopenharmony_ciInherits from **SymbolEffect**.
340e41f4b71Sopenharmony_ci
341e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
342e41f4b71Sopenharmony_ci
343e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
344e41f4b71Sopenharmony_ci
345e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
346e41f4b71Sopenharmony_ci
347e41f4b71Sopenharmony_ci### Attributes
348e41f4b71Sopenharmony_ci
349e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
350e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
351e41f4b71Sopenharmony_ci| scope     | [EffectScope](#effectscope12)         | No  | Effect scope.<br>Default value: **EffectScope.LAYER**   |
352e41f4b71Sopenharmony_ci| direction | [EffectDirection](#effectdirection12) | No  | Effect direction.<br>Default value: **EffectDirection.DOWN**|
353e41f4b71Sopenharmony_ci
354e41f4b71Sopenharmony_ci### constructor<sup>12+</sup>
355e41f4b71Sopenharmony_ci
356e41f4b71Sopenharmony_ciconstructor(scope?: EffectScope, direction?: EffectDirection)
357e41f4b71Sopenharmony_ci
358e41f4b71Sopenharmony_ciA constructor used to create a **BounceSymbolEffect** instance, which comes with a bounce animation effect.
359e41f4b71Sopenharmony_ci
360e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
361e41f4b71Sopenharmony_ci
362e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
363e41f4b71Sopenharmony_ci
364e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
365e41f4b71Sopenharmony_ci
366e41f4b71Sopenharmony_ci**Parameters**
367e41f4b71Sopenharmony_ci
368e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
369e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
370e41f4b71Sopenharmony_ci| scope     | [EffectScope](#effectscope12)         | No  | Effect scope.<br>Default value: **EffectScope.LAYER**   |
371e41f4b71Sopenharmony_ci| direction | [EffectDirection](#effectdirection12) | No  | Effect direction.<br>Default value: **EffectDirection.DOWN**|
372e41f4b71Sopenharmony_ci
373e41f4b71Sopenharmony_ci## ReplaceSymbolEffect<sup>12+</sup>
374e41f4b71Sopenharmony_ci
375e41f4b71Sopenharmony_ciInherits from **SymbolEffect**.
376e41f4b71Sopenharmony_ci
377e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
378e41f4b71Sopenharmony_ci
379e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
380e41f4b71Sopenharmony_ci
381e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
382e41f4b71Sopenharmony_ci
383e41f4b71Sopenharmony_ci### Attributes
384e41f4b71Sopenharmony_ci
385e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
386e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
387e41f4b71Sopenharmony_ci| scope | [EffectScope](#effectscope12) | No  | Effect scope.<br>Default value: **EffectScope.LAYER**|
388e41f4b71Sopenharmony_ci
389e41f4b71Sopenharmony_ci### constructor<sup>12+</sup>
390e41f4b71Sopenharmony_ci
391e41f4b71Sopenharmony_ciconstructor(scope?: EffectScope)
392e41f4b71Sopenharmony_ci
393e41f4b71Sopenharmony_ciA constructor used to create a **ReplaceSymbolEffect** instance, which comes with a replace animation effect.
394e41f4b71Sopenharmony_ci
395e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
396e41f4b71Sopenharmony_ci
397e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
398e41f4b71Sopenharmony_ci
399e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
400e41f4b71Sopenharmony_ci
401e41f4b71Sopenharmony_ci**Parameters**
402e41f4b71Sopenharmony_ci
403e41f4b71Sopenharmony_ci| Name| Type| Mandatory| Description |
404e41f4b71Sopenharmony_ci| ---- | ---- | ---- | ---- |
405e41f4b71Sopenharmony_ci| scope  | [EffectScope](#effectscope12) | No  | Effect scope.<br>Default value: **EffectScope.LAYER**|
406e41f4b71Sopenharmony_ci
407e41f4b71Sopenharmony_ci## PulseSymbolEffect<sup>12+</sup>
408e41f4b71Sopenharmony_ci
409e41f4b71Sopenharmony_ci### constructor<sup>12+</sup>
410e41f4b71Sopenharmony_ci
411e41f4b71Sopenharmony_ciconstructor()
412e41f4b71Sopenharmony_ci
413e41f4b71Sopenharmony_ciA constructor used to create a **PulseSymbolEffect** instance, which comes with a pulse animation effect.
414e41f4b71Sopenharmony_ci
415e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
416e41f4b71Sopenharmony_ci
417e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
418e41f4b71Sopenharmony_ci
419e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
420e41f4b71Sopenharmony_ci
421e41f4b71Sopenharmony_ci## EffectDirection<sup>12+</sup>
422e41f4b71Sopenharmony_ci
423e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
424e41f4b71Sopenharmony_ci
425e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
426e41f4b71Sopenharmony_ci
427e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
428e41f4b71Sopenharmony_ci
429e41f4b71Sopenharmony_ci| Name| Value  | Description            |
430e41f4b71Sopenharmony_ci| ---- | ---- | ---------------- |
431e41f4b71Sopenharmony_ci| DOWN | 0    | The symbol scales down and then returns to its original size.|
432e41f4b71Sopenharmony_ci| UP   | 1    | The symbol scales up and then returns to its original size.|
433e41f4b71Sopenharmony_ci
434e41f4b71Sopenharmony_ci## EffectScope<sup>12+</sup>
435e41f4b71Sopenharmony_ci
436e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
437e41f4b71Sopenharmony_ci
438e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
439e41f4b71Sopenharmony_ci
440e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
441e41f4b71Sopenharmony_ci
442e41f4b71Sopenharmony_ci| Name | Value  | Description      |
443e41f4b71Sopenharmony_ci| ----- | ---- | ---------- |
444e41f4b71Sopenharmony_ci| LAYER | 0    | Layered mode.|
445e41f4b71Sopenharmony_ci| WHOLE | 1    | Whole mode.|
446e41f4b71Sopenharmony_ci
447e41f4b71Sopenharmony_ci## EffectFillStyle<sup>12+</sup>
448e41f4b71Sopenharmony_ci
449e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
450e41f4b71Sopenharmony_ci
451e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
452e41f4b71Sopenharmony_ci
453e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
454e41f4b71Sopenharmony_ci
455e41f4b71Sopenharmony_ci| Name      | Value  | Description      |
456e41f4b71Sopenharmony_ci| ---------- | ---- | ---------- |
457e41f4b71Sopenharmony_ci| CUMULATIVE | 0    | Cumulative style.|
458e41f4b71Sopenharmony_ci| ITERATIVE  | 1    | Iterative style.|
459e41f4b71Sopenharmony_ci
460e41f4b71Sopenharmony_ci## SymbolEffectStrategy<sup>11+</sup>
461e41f4b71Sopenharmony_ci
462e41f4b71Sopenharmony_ciEnumerates symbol effect types. Once applied, the symbol effect becomes active instantly, eliminating the need for triggering.
463e41f4b71Sopenharmony_ci
464e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
465e41f4b71Sopenharmony_ci
466e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
467e41f4b71Sopenharmony_ci
468e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
469e41f4b71Sopenharmony_ci
470e41f4b71Sopenharmony_ci| Name    | Description                           |
471e41f4b71Sopenharmony_ci| ------ | ----------------------------- |
472e41f4b71Sopenharmony_ci| NONE | No effect (default value).|
473e41f4b71Sopenharmony_ci| SCALE | Scale effect as a whole.                |
474e41f4b71Sopenharmony_ci|  HIERARCHICAL  | Hierarchical effect. |
475e41f4b71Sopenharmony_ci
476e41f4b71Sopenharmony_ci## SymbolRenderingStrategy<sup>11+</sup>
477e41f4b71Sopenharmony_ci
478e41f4b71Sopenharmony_ciEnumerates the rendering modes.
479e41f4b71Sopenharmony_ci
480e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 12.
481e41f4b71Sopenharmony_ci
482e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 12.
483e41f4b71Sopenharmony_ci
484e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full
485e41f4b71Sopenharmony_ci
486e41f4b71Sopenharmony_ci| Name    | Description                           |
487e41f4b71Sopenharmony_ci| ------ | ----------------------------- |
488e41f4b71Sopenharmony_ci| SINGLE  | Single-color mode (default).<br> The default color is black, and one color can be set.<br> If multiple colors are set, only the first color takes effect.|
489e41f4b71Sopenharmony_ci| MULTIPLE_COLOR  |  Multi-color mode.<br> A maximum of three colors can be set. If only one color is set, it updates the color of the first layer, leaving other colors at their default values.<br> The sequence of color settings matches the layering order of the symbol; any colors beyond the number of symbol layers will not take effect.<br> Only color values are accepted. Opacity settings do not take effect.|
490e41f4b71Sopenharmony_ci|  MULTIPLE_OPACITY   | Layered mode.<br> The default color is black, and one color can be set. If multiple colors are set, only the first color takes effect.<br> Opacity is related to the layer, with the first layer at 100%, the second layer at 50%, and the third layer at 20%. |
491e41f4b71Sopenharmony_ci
492e41f4b71Sopenharmony_ci## Events
493e41f4b71Sopenharmony_ci
494e41f4b71Sopenharmony_ciThe [universal events](ts-universal-events-click.md) are supported.
495e41f4b71Sopenharmony_ci
496e41f4b71Sopenharmony_ci## Example
497e41f4b71Sopenharmony_ci
498e41f4b71Sopenharmony_ci###  Example 1
499e41f4b71Sopenharmony_ci
500e41f4b71Sopenharmony_ci```ts
501e41f4b71Sopenharmony_ci// xxx.ets
502e41f4b71Sopenharmony_ci@Entry
503e41f4b71Sopenharmony_ci@Component
504e41f4b71Sopenharmony_cistruct Index {
505e41f4b71Sopenharmony_ci  build() {
506e41f4b71Sopenharmony_ci    Column() {
507e41f4b71Sopenharmony_ci      Row() {
508e41f4b71Sopenharmony_ci        Column() {
509e41f4b71Sopenharmony_ci          Text("Light")
510e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_trash'))
511e41f4b71Sopenharmony_ci            .fontWeight(FontWeight.Lighter)
512e41f4b71Sopenharmony_ci            .fontSize(96)
513e41f4b71Sopenharmony_ci        }
514e41f4b71Sopenharmony_ci
515e41f4b71Sopenharmony_ci        Column() {
516e41f4b71Sopenharmony_ci          Text("Normal")
517e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_trash'))
518e41f4b71Sopenharmony_ci            .fontWeight(FontWeight.Normal)
519e41f4b71Sopenharmony_ci            .fontSize(96)
520e41f4b71Sopenharmony_ci        }
521e41f4b71Sopenharmony_ci
522e41f4b71Sopenharmony_ci        Column() {
523e41f4b71Sopenharmony_ci          Text("Bold")
524e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_trash'))
525e41f4b71Sopenharmony_ci            .fontWeight(FontWeight.Bold)
526e41f4b71Sopenharmony_ci            .fontSize(96)
527e41f4b71Sopenharmony_ci        }
528e41f4b71Sopenharmony_ci      }
529e41f4b71Sopenharmony_ci
530e41f4b71Sopenharmony_ci      Row() {
531e41f4b71Sopenharmony_ci        Column() {
532e41f4b71Sopenharmony_ci          Text("Single-color mode")
533e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_folder_badge_plus'))
534e41f4b71Sopenharmony_ci            .fontSize(96)
535e41f4b71Sopenharmony_ci            .renderingStrategy(SymbolRenderingStrategy.SINGLE)
536e41f4b71Sopenharmony_ci            .fontColor([Color.Black, Color.Green, Color.White])
537e41f4b71Sopenharmony_ci        }
538e41f4b71Sopenharmony_ci
539e41f4b71Sopenharmony_ci        Column() {
540e41f4b71Sopenharmony_ci          Text("Multi-color mode")
541e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_folder_badge_plus'))
542e41f4b71Sopenharmony_ci            .fontSize(96)
543e41f4b71Sopenharmony_ci            .renderingStrategy(SymbolRenderingStrategy.MULTIPLE_COLOR)
544e41f4b71Sopenharmony_ci            .fontColor([Color.Black, Color.Green, Color.White])
545e41f4b71Sopenharmony_ci        }
546e41f4b71Sopenharmony_ci
547e41f4b71Sopenharmony_ci        Column() {
548e41f4b71Sopenharmony_ci          Text ("Layered mode")
549e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_folder_badge_plus'))
550e41f4b71Sopenharmony_ci            .fontSize(96)
551e41f4b71Sopenharmony_ci            .renderingStrategy(SymbolRenderingStrategy.MULTIPLE_OPACITY)
552e41f4b71Sopenharmony_ci            .fontColor([Color.Black, Color.Green, Color.White])
553e41f4b71Sopenharmony_ci        }
554e41f4b71Sopenharmony_ci      }
555e41f4b71Sopenharmony_ci
556e41f4b71Sopenharmony_ci      Row() {
557e41f4b71Sopenharmony_ci        Column() {
558e41f4b71Sopenharmony_ci          Text("No effect")
559e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_wifi'))
560e41f4b71Sopenharmony_ci            .fontSize(96)
561e41f4b71Sopenharmony_ci            .effectStrategy(SymbolEffectStrategy.NONE)
562e41f4b71Sopenharmony_ci        }
563e41f4b71Sopenharmony_ci
564e41f4b71Sopenharmony_ci        Column() {
565e41f4b71Sopenharmony_ci          Text("Overall scale effect")
566e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_wifi'))
567e41f4b71Sopenharmony_ci            .fontSize(96)
568e41f4b71Sopenharmony_ci            .effectStrategy(1)
569e41f4b71Sopenharmony_ci        }
570e41f4b71Sopenharmony_ci
571e41f4b71Sopenharmony_ci        Column() {
572e41f4b71Sopenharmony_ci          Text("Hierarchical effect")
573e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_wifi'))
574e41f4b71Sopenharmony_ci            .fontSize(96)
575e41f4b71Sopenharmony_ci            .effectStrategy(2)
576e41f4b71Sopenharmony_ci        }
577e41f4b71Sopenharmony_ci      }
578e41f4b71Sopenharmony_ci    }
579e41f4b71Sopenharmony_ci  }
580e41f4b71Sopenharmony_ci}
581e41f4b71Sopenharmony_ci```
582e41f4b71Sopenharmony_ci![symbol](figures/symbolGlyph.gif)
583e41f4b71Sopenharmony_ci
584e41f4b71Sopenharmony_ci###  Example 2
585e41f4b71Sopenharmony_ci
586e41f4b71Sopenharmony_ciThis example demonstrates the use of the s**ymbolEffec**t attribute in the **SymbolGlyph** component to achieve variable color and replace animation effects.
587e41f4b71Sopenharmony_ci
588e41f4b71Sopenharmony_ci```ts
589e41f4b71Sopenharmony_ci// xxx.ets
590e41f4b71Sopenharmony_ci@Entry
591e41f4b71Sopenharmony_ci@Component
592e41f4b71Sopenharmony_cistruct Index {
593e41f4b71Sopenharmony_ci  @State isActive: boolean = true;
594e41f4b71Sopenharmony_ci  @State triggerValueReplace: number = 0;
595e41f4b71Sopenharmony_ci  replaceFlag: boolean = true;
596e41f4b71Sopenharmony_ci
597e41f4b71Sopenharmony_ci  build() {
598e41f4b71Sopenharmony_ci    Column() {
599e41f4b71Sopenharmony_ci      Row() {
600e41f4b71Sopenharmony_ci        Column() {
601e41f4b71Sopenharmony_ci          Text("Variable Color Animation")
602e41f4b71Sopenharmony_ci          SymbolGlyph($r('sys.symbol.ohos_wifi'))
603e41f4b71Sopenharmony_ci            .fontSize(96)
604e41f4b71Sopenharmony_ci            .symbolEffect(new HierarchicalSymbolEffect(EffectFillStyle.ITERATIVE), this.isActive)
605e41f4b71Sopenharmony_ci          Button(this.isActive ? 'Off' : 'Play').onClick(() => {
606e41f4b71Sopenharmony_ci            this.isActive = !this.isActive;
607e41f4b71Sopenharmony_ci          })
608e41f4b71Sopenharmony_ci        }.margin({right:20})
609e41f4b71Sopenharmony_ci
610e41f4b71Sopenharmony_ci        Column() {
611e41f4b71Sopenharmony_ci          Text("Replace Animation")
612e41f4b71Sopenharmony_ci          SymbolGlyph(this.replaceFlag ? $r('sys.symbol.checkmark_circle') : $r('sys.symbol.repeat_1'))
613e41f4b71Sopenharmony_ci            .fontSize(96)
614e41f4b71Sopenharmony_ci            .symbolEffect(new ReplaceSymbolEffect(EffectScope.WHOLE), this.triggerValueReplace)
615e41f4b71Sopenharmony_ci          Button('trigger').onClick(() => {
616e41f4b71Sopenharmony_ci            this.replaceFlag = !this.replaceFlag;
617e41f4b71Sopenharmony_ci            this.triggerValueReplace = this.triggerValueReplace + 1;
618e41f4b71Sopenharmony_ci          })
619e41f4b71Sopenharmony_ci        }
620e41f4b71Sopenharmony_ci      }
621e41f4b71Sopenharmony_ci    }.margin({
622e41f4b71Sopenharmony_ci      left:30,
623e41f4b71Sopenharmony_ci      top:50
624e41f4b71Sopenharmony_ci    })
625e41f4b71Sopenharmony_ci  }
626e41f4b71Sopenharmony_ci}
627e41f4b71Sopenharmony_ci```
628e41f4b71Sopenharmony_ci![symbol](figures/symbolGlyph_symbolEffect.gif)
629