Documentation Index
Fetch the complete documentation index at: https://mintlify.com/felipe-software/react-native-jelly-tabs/llms.txt
Use this file to discover all available pages before exploring further.
TouchFeedback renders an animated radial SVG gradient glow that tracks the user’s touch position across the tab bar. It is the primitive behind the soft light effect you see spreading from under a finger when interacting with the bar.
Import
Overview
TouchFeedback renders an animated radial SVG gradient glow that tracks the user’s touch position across the tab bar. It is the primitive behind the soft light effect you see spreading from under a finger when interacting with the bar.
How it works
TouchFeedback renders an Animated.View sized to diameter × diameter (i.e. radius * 2 on each side), anchored at (offsetX, offsetY) relative to its positioned ancestor. Inside it, a react-native-svg <Svg> element draws a <RadialGradient> with three stops:
| Stop offset | Opacity |
|---|---|
0% (center) | centerOpacity |
45% (middle) | middleOpacity |
100% (edge) | 0 |
animatedStyle prop drives the position of the Animated.View (typically a translateX/translateY transform from usePillJelly) so the glow follows the finger in real time with a Reanimated worklet animation.
When to use
UseTouchFeedback when building a fully custom tab component that needs the touch glow effect independently of JellyTabBarHeadless. For most use-cases JellyTabBarHeadless already renders this internally and exposes touchFeedbackEnabled, touchFeedbackColor, touchFeedbackOpacity, and touchFeedbackScale to control it.
Props
Reanimated animated style applied to the root
Animated.View. Use a translateX/translateY transform to move the glow to the touch point. The style is merged after the static position styles (left: offsetX, top: offsetY).Opacity of the gradient’s center stop (at
0% offset). Controls how bright the glow is at its hotspot. Typically set to the resolved touchFeedbackOpacity value.Color of the radial gradient. Applied to all three stops; only the opacity varies between them. Defaults to
'#ffffff'.Total width and height of the
Animated.View and <Svg> element in pixels. Must equal radius * 2.The
id attribute of the SVG <RadialGradient> element. Must be unique per TouchFeedback instance on the same screen. When two instances share the same gradientId, the SVG <defs> lookup is ambiguous and one glow will render with the wrong style. JellyTabBarHeadless uses "tabbar-touch-feedback" for the track glow and "selected-tab-touch-feedback" for the pill glow.Opacity of the gradient’s middle stop (at
45% offset). Creates a softer fall-off between the bright center and the transparent edge. In JellyTabBarHeadless this is calculated as centerOpacity × distortion.touchFeedback.middleOpacityRatio (default ratio: 0.43).Horizontal offset in pixels from the left edge of the positioned ancestor to the left edge of the gradient circle. Use this to align the glow’s coordinate system with the track when the
TouchFeedback is nested inside an overscan container. Defaults to 0.Vertical offset in pixels from the top edge of the positioned ancestor to the top edge of the gradient circle. Use this to align the glow’s coordinate system with the track when the
TouchFeedback is nested inside an overscan container. Defaults to 0.Radius of the radial gradient in pixels. Used as the
r, cx, cy, fx, and fy attributes of the SVG <RadialGradient>. Must equal diameter / 2.