Code Monkey home page Code Monkey logo

react-carousel's Introduction

<-------- React Carousel --------->

  1. I built this react carousel with the help of React hooks:- useEffect and useState.

  2. This can take input as a Image and Text from the user.

  3. I write the function logic with the help of useState:- First set the initial state = 0; then using useEffect inside it setInterval to set the timing of an auto-sliding effect of the carousel. ----> user can set the auto-sliding effect timing by changing the interval provided.

react-carousel's People

Contributors

khusbu853 avatar

Watchers

 avatar

react-carousel's Issues

Props are not used in the Carousel component

Please use props whose type something like this:

type CarouseProps = {
 // time in milliseconds
 intervalTime?: number;
 // position of text. The format of position will be top bottom.
 // Ex. - 50% 50% for center. 0% 50%.
 // Hint - You might find it helpful to position the text absolute
 // and apply appropriate transformation.
 textPosition?: string;
 items: {
   // CSS background image
   backgroundImage?: string;
   // CSS background color
   backgroundColor?: string;
   // CSS background repeat
   backgroundRepeat?: string;
   // text to display
   text: string;
   // same as textPosition. If supplied for an item, it will override
   // the outer textPosition property.
   textPosition?: string;
 }[];
};
 

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.