Blur effect
To add a blur effect to an element, use the blur extension (iOS only):
Example
{
"extensions": [
{
"id": "blur",
"params": {
"intensity": 0.5
}
}
]
}
Specify exactly one of the style and intensity parameters. If both parameters are specified, or
if neither is specified, DivKit reports a block modeling error and does not apply the blur.
Parameters
|
Parameters |
Description |
|
|
Extension ID. |
|
|
Blur effect style at full system intensity. This parameter cannot be used together with
|
|
|
Intensity of the regular system blur in the |
How it works
- The iOS system blur styles are used.
- You can choose either a system style at full intensity or the regular blur with configurable intensity.
- Supports both basic styles and material styles with variants for light and dark themes.
- The blur covers the whole area of the element and is displayed under its content: whatever is behind the element is blurred.
Connection
DivKitComponents(
...
extensionHandlers: [
BlurExtensionHandler()
]
)
Learn more
You can discuss topics of interest in the DivKit user community in Telegram: https://t.me/divkit_community_en.