Learus/react-material-ui-carousel: A Generic carousel UI component for React using Material UI.

PHOTO EMBED

Thu Jun 17 2021 15:57:27 GMT+0000 (Coordinated Universal Time)

Saved by @Avirup #js #react.js

import React from 'react';
import Carousel from 'react-material-ui-carousel'
import { Paper, Button } from '@material-ui/core'

function Example(props)
{
    var items = [
        {
            name: "Random Name #1",
            description: "Probably the most random thing you have ever seen!"
        },
        {
            name: "Random Name #2",
            description: "Hello World!"
        }
    ]

    return (
        <Carousel>
            {
                items.map( (item, i) => <Item key={i} item={item} /> )
            }
        </Carousel>
    )
}

function Item(props)
{
    return (
        <Paper>
            <h2>{props.item.name}</h2>
            <p>{props.item.description}</p>

            <Button className="CheckButton">
                Check it out!
            </Button>
        </Paper>
    )
}
content_copyCOPY

When i wanted to design a basic Carousel.

https://github.com/Learus/react-material-ui-carousel