Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

152
Vistas
Creating a ScrollView with a sticky top tab navigator?

Hello I am trying to create a component in my app that looks really similar to this. I am currently struggling with how to make it so that i can have a collapsible header that scrolls seamlessly through both the header and the nested tabs scrollviews.

Here's what i have so far. As you can see, the scrollview is causing both the header and the content area to scroll at the same time. I was wondering if there was a way to make the header scroll first (when at the top) and then the content area scrolling after.

Here is my code
Header with tabs Render in parent:

<Animated.View 
  style={[styles.headerScrollableContainerContent, {
    top: headerHeight
  }]} 
>
   <View>
      {...header content}
   </View
   {TabRender()}
</Animated.View>

Header height calculation:

const scrollY = useRef(new Animated.Value(0)).current;
const headerHeight = scrollY.interpolate({
   inputRange: [0, HEADER_SCROLL_DISTANCE],
   outputRange: [HEADER_MAX_HEIGHT, HEADER_MIN_HEIGHT],
   extrapolate: 'clamp',
});

About Tab:

<ScrollView
  style={styles.container}
  onScroll={Animated.event(
    [{nativeEvent: {contentOffset: {y: props.scrollY}}}],
    {useNativeDriver: false}
  )}
  scrollEventThrottle={16}
>
   {...Scroll content}
</ScrollView>

Please let me know if you have any ideas or suggestions. Any help would be truly appreciated!

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda