# install with npm
npm install @uportal/content-carousel
# install with yarn
yarn add @uportal/content-carousel
install with maven
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>uportal__content-carousel</artifactId>
<version>{version number goes here}</version>
</dependency>
install with gradle
compile 'org.webjars.npm:uportal__content-carousel:{version number goes here}'
The component requires an rss file path, slick options (link below). It also allows for a carouselHeight (in rem units) and a fitToContainer
property which causes it to size to its container (horizontally).
heroOptions = {
slidesToShow: 1,
infinite: true,
arrows: true
};
contentOptions = {
slidesToShow: 3,
infinite: true,
arrows: true,
dots: true
};
<script src="https://unpkg.com/vue"></script>
<script src="./content-carousel.js"></script>
<ContentCarousel
:rss="'/hero.rss'"
:slickOptions="heroOptions"
:carouselHeight="'30rem'"
:fitToContainer="true" />
<ContentCarousel
:rss="'/content.rss'"
:slickOptions="contentOptions" />