FadingView
This is a convenience component to control the opacity of its children with the supplied opacity property. In addition to controling the opacity of its children, it will not allow for pointer events (i.e. touch events) to pass through to the children when the opacity is below the opacityThresholdToEnablePointerEvents property.
Props
Since this component uses an Animated.View
(from Reanimated) under the hood, it supports all of
the props that Animated.View
supports.
opacity
The opacity of the children of this component. This is an animated Shared Value between 0 and 1.
opacityThresholdToEnablePointerEvents
An optional number that represents the opacity threshold at which to enable pointer events (i.e.
touch events) on the children. Defaults to 1
and should be a number between 0 and 1.
style
An optional style object to apply to the animated container view.
children
The children to be rendered inside the animated container view.