Skip to main content

Bear Slide Image

If you want to use the image directly instead of putting it in the background

import BearCarousel, {BearSlideImage} from 'bear-react-carousel';

const numberColors = [
{id: 1, imageUrl: '/test/01.jpg'},
{id: 2, imageUrl: '/test/01.jpg'},
{id: 3, imageUrl: '/test/01.jpg'},
];

const data = numberColors.map(row => {
return {
key: row.id,
children: <BearSlideImage imageUrl={row.imageUrl}/>
};
});

<BearCarousel
// ...ignore some
height="250px"
data={data}
/>

Props

PropsNameTypeRequiredDefaultDescription
styleCSS.Properties
classNamestring
imageUrlstringimage url
onClick() => voidimage onclick event