0

enter image description here

I'm trying to change the layout of the images which are showing below I want to show them on the top I just want to change the layout of the images which are showing below I want to show them above the first card

export default function App({navigation}) {
  const [index, setIndex] = React.useState(0);
  const onSwiped = () => {
    transitionRef.current.animateNextTransition();
    setIndex((index + 1) % data.length);
  };

  return (
    <SafeAreaView style={styles.container}>
      <View
        style={{
          backgroundColor: 'black',
          opacity: 0.05,
          transform: [{rotate: '45deg'}, {scale: 1.6}],
          position: 'absolute',
          left: -15,
          top: 30,
        }}></View>
      <View style={styles.swiperContainer}>
        <Swiper
          ref={swiperRef}
          cards={data}
          cardIndex={index}
          renderCard={card => <Card card={card} />}
          infinite
          backgroundColor={'transparent'}
          onSwiped={onSwiped}
          onTapCard={() => swiperRef.current.swipeLeft()}
          cardVerticalMargin={50}
          stackSize={stackSize}
          animateCardOpacity={true}
          stackScale={8}
          stackSize={3}
          verticalSwipe={false}
          stackSeparation={13}
          animateOverlayLabelsOpacity
          animateCardOpacity
          disableTopSwipe
          disableBottomSwipe
        />
      </View>
    </SafeAreaView>
  );
}

2 Answers2

0

Change this in your styles: top: 30 => top: -30

Alireza Hadjar
  • 450
  • 4
  • 10
0

Use stackseparation. stackSeparation={-20}

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/30383189) – Ghost Ops Nov 20 '21 at 10:47