@placardi/carousel
v0.1.2
Published
Placardi UI carousel component
Downloads
3
Readme
@placardi/carousel
A carousel can be used to display a set of images one at a time.
Installation
npm i @placardi/carousel
Dependencies
- react
- styled-components
- @placardi/theme
Usage
Basic usage
In order to use the carousel component, wrap the application in global theme provider from @placardi/theme
. Then, use the carousel as any regular component.
import React, { FC } from 'react';
import ThemeProvider from '@placardi/theme';
import Carousel, { CarouselItem } from '@placardi/carousel';
const App: FC = () => (
<ThemeProvider>
<Carousel>
<CarouselItem>
<img src="img1.jpeg" />
</CarouselItem>
<CarouselItem>
<img src="img2.jpeg" />
</CarouselItem>
</Carousel>
</ThemeProvider>
);
export default App;