Blur
Apply a Gaussian blur effect.| Name | Type | Description |
|---|---|---|
| blur | number or Vector | Blur radius (x and y) |
| mode | TileMode | Edge handling mode (default: “decal”) |
| children | ReactNode | Content to apply filter to |
Blur with Vector Radius
Apply different blur amounts horizontally and vertically:Tile Modes
"clamp"- Clamp to edge colors"repeat"- Repeat the image"mirror"- Mirror the image"decal"- Transparent outside (default)
Shadow
Add drop shadow or inner shadow effects.| Name | Type | Description |
|---|---|---|
| dx | number | Horizontal shadow offset |
| dy | number | Vertical shadow offset |
| blur | number | Shadow blur radius |
| color | Color | Shadow color |
| inner | boolean | Inner shadow (default: false) |
| shadowOnly | boolean | Only show shadow (default: false) |
| children | ReactNode | Content to apply filter to |
Inner Shadow
Shadow Only
Render only the shadow without the original content:Offset
Offset the rendered content.| Name | Type | Description |
|---|---|---|
| x | number | Horizontal offset |
| y | number | Vertical offset |
| children | ReactNode | Content to apply filter to |
Morphology
Apply erosion or dilation effects.| Name | Type | Description |
|---|---|---|
| operator | "erode" or "dilate" | Morphology operation |
| radius | number or Vector | Effect radius |
| children | ReactNode | Content to apply filter to |
DisplacementMap
Displace pixels using a displacement map.| Name | Type | Description |
|---|---|---|
| channelX | ColorChannel | Channel for X displacement |
| channelY | ColorChannel | Channel for Y displacement |
| scale | number | Displacement scale |
| children | ReactNode | Content and displacement map |
Color Channels
"r"- Red channel"g"- Green channel"b"- Blue channel"a"- Alpha channel
RuntimeShader
Apply a custom shader as an image filter.| Name | Type | Description |
|---|---|---|
| source | SkRuntimeEffect | Runtime shader effect |
| uniforms | Uniforms | Shader uniform values |
| children | ReactNode | Content to apply filter to |
Combining Image Filters
Image filters can be composed to create complex effects:Blur with Image
Common pattern for blurred images:Performance Considerations
- Image filters can be computationally expensive
- Large blur radii significantly impact performance
- Consider using smaller blur radii or downsampling for better performance
- Combine filters judiciously to maintain 60 FPS
Imperative API
Create image filters imperatively:Related
- Color Filters - Color transformations
- Mask Filters - Edge effects
- Backdrop Filters - Filter background content
- Shaders - Custom shader effects