Giter Site home page Giter Site logo

r0b0t3d / react-native-carousel Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 6.0 8.72 MB

React Native carousel

License: MIT License

JavaScript 7.37% TypeScript 66.05% Java 16.04% Ruby 1.93% Objective-C 8.18% Swift 0.18% C 0.26%
carousel infinite-scroll reanimated2

react-native-carousel's Introduction

Hi there ๐Ÿ‘‹

๐Ÿง‘ About me

  • ๐Ÿ’ป Developer
  • ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง Husband, Father

๐Ÿ† Stats

r0b0t3d's github stats

Top Langs

Readme Card

react-native-carousel's People

Contributors

dependabot[bot] avatar r0b0t3d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-carousel's Issues

Off behavior when

When itemWidth is less than the width of the actual content the content itself is being cut off.
This could be useful when one wants to have side items being visible.

Expected behavior:

image

Actual behavior:

image


export const Carousel = withCarouselContext(
  ({ extractImageUrl, ...props }: Props) => {
    const { width, height } = useWindowDimensions();
    return (
      <View>
        <CarouselRN
          style={styles.carousel}
          loop
          itemWidth={width - 60}
          inactiveOpacity={1}
          inactiveScale={0.82}
          renderItem={(data) => {
            return (
              <View
                style={{
                  borderRadius: 24,
                  width: width - 40,
                  height: 183,
                  overflow: 'hidden',
                  justifyContent: 'center',
                  zIndex: 300,
                }}
              >
                <Image
                  source={{ uri: data.item }}
                  style={[
                    { width: width },
                    styles.image,
                  ]}
                />
              </View>
            );
          }}
          {...props}
        />
      </View>
    );
  }
);

const styles = StyleSheet.create({
  image: {
    borderRadius: 24,
    height: 183,
  },
})

White flickering (Blinking) with autoplay and loop

When the last slide is scrolled, there is a white flickering on android
(the autoplay and loop props are set to true)

Bug reproduced by example which in repository
Version 3.4.2
Android

I tried to add removeClippedSubviews={false) but then there is an effect of the element appearing on the right

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.