Skip to content

Commit cbdd782

Browse files
authored
Document mixBlendMode view style prop (#4947)
1 parent 89322e0 commit cbdd782

8 files changed

Lines changed: 280 additions & 0 deletions

File tree

docs/view-style-props.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,41 @@ The following filter functions work on Android only:
389389

390390
---
391391

392+
### `mixBlendMode`
393+
394+
:::note
395+
`mixBlendMode` is only available on the [New Architecture](/architecture/landing-page)
396+
:::
397+
398+
Controls how the `View` blends its colors with the other elements in its **stacking context**. Check out the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) for a full overview of each blending function.
399+
400+
For more granular control over what should be blending together see [isolation](layout-props#isolation).
401+
402+
##### mixBlendMode Values
403+
404+
- `normal`: The element is drawn on top of its background without blending.
405+
- `multiply`: The source color is multiplied by the destination color and replaces the destination.
406+
- `screen`: Multiplies the complements of the backdrop and source color values, then complements the result.
407+
- `overlay`: Multiplies or screens the colors, depending on the backdrop color value.
408+
- `darken`: Selects the darker of the backdrop and source colors.
409+
- `lighten`: Selects the lighter of the backdrop and source colors.
410+
- `color-dodge`: Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
411+
- `color-burn`: Darkens the backdrop color to reflect the source color. Painting with white produces no change.
412+
- `hard-light`: Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.
413+
- `soft-light`: Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.
414+
- `difference`: Subtracts the darker of the two constituent colors from the lighter color.
415+
- `exclusion`: Produces an effect similar to that of the Difference mode but lower in contrast.
416+
- `hue`: Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.
417+
- `saturation`: Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.
418+
- `color`: Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.
419+
- `luminosity`: Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.
420+
421+
| Type |
422+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
423+
| enum(`'normal'`, `'multiply'`, `'screen'`, `'overlay'`, `'darken'`, `'lighten'`, `'color-dodge'`, `'color-burn'`, `'hard-light'`, `'soft-light'`, `'difference'`, `'exclusion'`, `'hue'`, `'saturation'`, `'color'`, `'luminosity'`) |
424+
425+
---
426+
392427
### `opacity`
393428

394429
| Type |

website/versioned_docs/version-0.77/view-style-props.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,41 @@ The following filter functions work on Android only:
389389

390390
---
391391

392+
### `mixBlendMode`
393+
394+
:::note
395+
`mixBlendMode` is only available on the [New Architecture](/architecture/landing-page)
396+
:::
397+
398+
Controls how the `View` blends its colors with the other elements in its **stacking context**. Check out the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) for a full overview of each blending function.
399+
400+
For more granular control over what should be blending together see [isolation](layout-props#isolation).
401+
402+
##### mixBlendMode Values
403+
404+
- `normal`: The element is drawn on top of its background without blending.
405+
- `multiply`: The source color is multiplied by the destination color and replaces the destination.
406+
- `screen`: Multiplies the complements of the backdrop and source color values, then complements the result.
407+
- `overlay`: Multiplies or screens the colors, depending on the backdrop color value.
408+
- `darken`: Selects the darker of the backdrop and source colors.
409+
- `lighten`: Selects the lighter of the backdrop and source colors.
410+
- `color-dodge`: Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
411+
- `color-burn`: Darkens the backdrop color to reflect the source color. Painting with white produces no change.
412+
- `hard-light`: Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.
413+
- `soft-light`: Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.
414+
- `difference`: Subtracts the darker of the two constituent colors from the lighter color.
415+
- `exclusion`: Produces an effect similar to that of the Difference mode but lower in contrast.
416+
- `hue`: Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.
417+
- `saturation`: Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.
418+
- `color`: Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.
419+
- `luminosity`: Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.
420+
421+
| Type |
422+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
423+
| enum(`'normal'`, `'multiply'`, `'screen'`, `'overlay'`, `'darken'`, `'lighten'`, `'color-dodge'`, `'color-burn'`, `'hard-light'`, `'soft-light'`, `'difference'`, `'exclusion'`, `'hue'`, `'saturation'`, `'color'`, `'luminosity'`) |
424+
425+
---
426+
392427
### `opacity`
393428

394429
| Type |

website/versioned_docs/version-0.78/view-style-props.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,41 @@ The following filter functions work on Android only:
389389

390390
---
391391

392+
### `mixBlendMode`
393+
394+
:::note
395+
`mixBlendMode` is only available on the [New Architecture](/architecture/landing-page)
396+
:::
397+
398+
Controls how the `View` blends its colors with the other elements in its **stacking context**. Check out the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) for a full overview of each blending function.
399+
400+
For more granular control over what should be blending together see [isolation](layout-props#isolation).
401+
402+
##### mixBlendMode Values
403+
404+
- `normal`: The element is drawn on top of its background without blending.
405+
- `multiply`: The source color is multiplied by the destination color and replaces the destination.
406+
- `screen`: Multiplies the complements of the backdrop and source color values, then complements the result.
407+
- `overlay`: Multiplies or screens the colors, depending on the backdrop color value.
408+
- `darken`: Selects the darker of the backdrop and source colors.
409+
- `lighten`: Selects the lighter of the backdrop and source colors.
410+
- `color-dodge`: Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
411+
- `color-burn`: Darkens the backdrop color to reflect the source color. Painting with white produces no change.
412+
- `hard-light`: Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.
413+
- `soft-light`: Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.
414+
- `difference`: Subtracts the darker of the two constituent colors from the lighter color.
415+
- `exclusion`: Produces an effect similar to that of the Difference mode but lower in contrast.
416+
- `hue`: Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.
417+
- `saturation`: Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.
418+
- `color`: Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.
419+
- `luminosity`: Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.
420+
421+
| Type |
422+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
423+
| enum(`'normal'`, `'multiply'`, `'screen'`, `'overlay'`, `'darken'`, `'lighten'`, `'color-dodge'`, `'color-burn'`, `'hard-light'`, `'soft-light'`, `'difference'`, `'exclusion'`, `'hue'`, `'saturation'`, `'color'`, `'luminosity'`) |
424+
425+
---
426+
392427
### `opacity`
393428

394429
| Type |

website/versioned_docs/version-0.79/view-style-props.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,41 @@ The following filter functions work on Android only:
389389

390390
---
391391

392+
### `mixBlendMode`
393+
394+
:::note
395+
`mixBlendMode` is only available on the [New Architecture](/architecture/landing-page)
396+
:::
397+
398+
Controls how the `View` blends its colors with the other elements in its **stacking context**. Check out the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) for a full overview of each blending function.
399+
400+
For more granular control over what should be blending together see [isolation](layout-props#isolation).
401+
402+
##### mixBlendMode Values
403+
404+
- `normal`: The element is drawn on top of its background without blending.
405+
- `multiply`: The source color is multiplied by the destination color and replaces the destination.
406+
- `screen`: Multiplies the complements of the backdrop and source color values, then complements the result.
407+
- `overlay`: Multiplies or screens the colors, depending on the backdrop color value.
408+
- `darken`: Selects the darker of the backdrop and source colors.
409+
- `lighten`: Selects the lighter of the backdrop and source colors.
410+
- `color-dodge`: Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
411+
- `color-burn`: Darkens the backdrop color to reflect the source color. Painting with white produces no change.
412+
- `hard-light`: Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.
413+
- `soft-light`: Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.
414+
- `difference`: Subtracts the darker of the two constituent colors from the lighter color.
415+
- `exclusion`: Produces an effect similar to that of the Difference mode but lower in contrast.
416+
- `hue`: Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.
417+
- `saturation`: Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.
418+
- `color`: Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.
419+
- `luminosity`: Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.
420+
421+
| Type |
422+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
423+
| enum(`'normal'`, `'multiply'`, `'screen'`, `'overlay'`, `'darken'`, `'lighten'`, `'color-dodge'`, `'color-burn'`, `'hard-light'`, `'soft-light'`, `'difference'`, `'exclusion'`, `'hue'`, `'saturation'`, `'color'`, `'luminosity'`) |
424+
425+
---
426+
392427
### `opacity`
393428

394429
| Type |

website/versioned_docs/version-0.80/view-style-props.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,41 @@ The following filter functions work on Android only:
389389

390390
---
391391

392+
### `mixBlendMode`
393+
394+
:::note
395+
`mixBlendMode` is only available on the [New Architecture](/architecture/landing-page)
396+
:::
397+
398+
Controls how the `View` blends its colors with the other elements in its **stacking context**. Check out the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) for a full overview of each blending function.
399+
400+
For more granular control over what should be blending together see [isolation](layout-props#isolation).
401+
402+
##### mixBlendMode Values
403+
404+
- `normal`: The element is drawn on top of its background without blending.
405+
- `multiply`: The source color is multiplied by the destination color and replaces the destination.
406+
- `screen`: Multiplies the complements of the backdrop and source color values, then complements the result.
407+
- `overlay`: Multiplies or screens the colors, depending on the backdrop color value.
408+
- `darken`: Selects the darker of the backdrop and source colors.
409+
- `lighten`: Selects the lighter of the backdrop and source colors.
410+
- `color-dodge`: Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
411+
- `color-burn`: Darkens the backdrop color to reflect the source color. Painting with white produces no change.
412+
- `hard-light`: Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.
413+
- `soft-light`: Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.
414+
- `difference`: Subtracts the darker of the two constituent colors from the lighter color.
415+
- `exclusion`: Produces an effect similar to that of the Difference mode but lower in contrast.
416+
- `hue`: Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.
417+
- `saturation`: Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.
418+
- `color`: Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.
419+
- `luminosity`: Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.
420+
421+
| Type |
422+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
423+
| enum(`'normal'`, `'multiply'`, `'screen'`, `'overlay'`, `'darken'`, `'lighten'`, `'color-dodge'`, `'color-burn'`, `'hard-light'`, `'soft-light'`, `'difference'`, `'exclusion'`, `'hue'`, `'saturation'`, `'color'`, `'luminosity'`) |
424+
425+
---
426+
392427
### `opacity`
393428

394429
| Type |

website/versioned_docs/version-0.81/view-style-props.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,41 @@ The following filter functions work on Android only:
389389

390390
---
391391

392+
### `mixBlendMode`
393+
394+
:::note
395+
`mixBlendMode` is only available on the [New Architecture](/architecture/landing-page)
396+
:::
397+
398+
Controls how the `View` blends its colors with the other elements in its **stacking context**. Check out the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) for a full overview of each blending function.
399+
400+
For more granular control over what should be blending together see [isolation](layout-props#isolation).
401+
402+
##### mixBlendMode Values
403+
404+
- `normal`: The element is drawn on top of its background without blending.
405+
- `multiply`: The source color is multiplied by the destination color and replaces the destination.
406+
- `screen`: Multiplies the complements of the backdrop and source color values, then complements the result.
407+
- `overlay`: Multiplies or screens the colors, depending on the backdrop color value.
408+
- `darken`: Selects the darker of the backdrop and source colors.
409+
- `lighten`: Selects the lighter of the backdrop and source colors.
410+
- `color-dodge`: Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
411+
- `color-burn`: Darkens the backdrop color to reflect the source color. Painting with white produces no change.
412+
- `hard-light`: Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.
413+
- `soft-light`: Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.
414+
- `difference`: Subtracts the darker of the two constituent colors from the lighter color.
415+
- `exclusion`: Produces an effect similar to that of the Difference mode but lower in contrast.
416+
- `hue`: Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.
417+
- `saturation`: Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.
418+
- `color`: Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.
419+
- `luminosity`: Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.
420+
421+
| Type |
422+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
423+
| enum(`'normal'`, `'multiply'`, `'screen'`, `'overlay'`, `'darken'`, `'lighten'`, `'color-dodge'`, `'color-burn'`, `'hard-light'`, `'soft-light'`, `'difference'`, `'exclusion'`, `'hue'`, `'saturation'`, `'color'`, `'luminosity'`) |
424+
425+
---
426+
392427
### `opacity`
393428

394429
| Type |

0 commit comments

Comments
 (0)