Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

corousal in react

import React from 'react';
import 'bootstrap/dist/css/bootstrap.css';
import Carousel from 'react-bootstrap/Carousel';

export default function Corousal() {
const images = ["slide-1.jpg","slide-2.jpg"]

const corousalComponent = images.map((image,i) => {
return(
		<Carousel.Item interval={1500}>
			<img className="img-slide " src={require("../images/"+image).default} alt="slide"/>
		</Carousel.Item>)
})
return (
	<div style={{ display: 'block'}}>
	<Carousel>
		{corousalComponent}
	</Carousel>
	</div>
);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript function to print hello world 
Javascript :: runincontext execute function 
Javascript :: double and operator javascript 
Javascript :: { "name":"walk dog", "isComplete":true } 
Javascript :: replace espacial characteres from string 
Javascript :: broadcast channel mdn 
Javascript :: grommetjs remove green over buttons 
Javascript :: scope hierarchy in angularjs 
Javascript :: when i send req upload image in node give Error: ENOENT: no such file or directory,ues multer 
Javascript :: check before element jquery 
Javascript :: app-root modal component 
Javascript :: fastselect clear select 
Javascript :: which is faster python or node.js for image saving as server 
Javascript :: "Lua" 
Javascript :: ddd 
Javascript :: best way to store db config in node js 
Javascript :: js cannot use import statement outside a module 
Javascript :: outline none react native web 
Javascript :: how we use usefef in map function 
Javascript :: contentful rte edit link type 
Javascript :: about react frame 
Javascript :: parallel and sequential implementation with asyn await javascript 
Javascript :: code converter javascript to python 
Javascript :: add onmouseover event in javascript 
Javascript :: jquery.MultiFile 
Javascript :: react native biometrics sign in 
Javascript :: NO "ELSE" STATEMENT IN THIS CODE 
Javascript :: convert javascript function to typescript online 
Javascript :: merge json files on phoenix render framework 
Javascript :: Confirm the EndingPassed--Javascript 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =