Skip to main content

Components

Carousel

Carousel used for advertising that allows marketers to place more than 1 image in a post

banner-Carousel
Square Icon

Selected Theme

Select brand or tribe name to preview style

Default

Usage

For use this components don’t forget to add import legion-ui

import { Carousel } from 'legion-ui';

Variant

Legion have three variant of Carousel. For using carousel you can create style first

1
2
3
const data = [
{
imageURL: 'https://legion-dev.vercel.app/images/apple.png',
alt: '1',
},
{
imageURL: 'https://legion-dev.vercel.app/images/apple.png',
alt: '2',
},
1
2
3
const data = [
{
imageURL: 'https://legion-dev.vercel.app/images/apple.png',
alt: '1',
},
{
imageURL: 'https://legion-dev.vercel.app/images/apple.png',
alt: '2',
},
1
Sub title
Mauris, turpis augue mauris tellus massa, lacus. Id quam adipiscing tincidunt at feugiat arcu in
2
Sub title
Mauris, turpis augue mauris tellus massa, lacus. Id quam adipiscing tincidunt at feugiat arcu in
3
Sub title
Mauris, turpis augue mauris tellus massa, lacus. Id quam adipiscing tincidunt at feugiat arcu in
const data = [
{
imageURL: 'https://legion-dev.vercel.app/images/apple.png',
alt: '1',
title: 'Sub title',
desc: 'Mauris, turpis augue mauris tellus massa, lacus. Id quam adipiscing tincidunt at feugiat arcu in',
},
{
imageURL: 'https://legion-dev.vercel.app/images/apple.png',

Example style

.wrapper {
width: 500px;
}

Props

propertypropTyperequireddefaultdesc
autoplayboolean-falseSets autoplay to slider
dataArray<CarouselData>yes-Sets data of carousel
descSizestring--Sets description font size (can use px or rem)
showControlboolean--Status that makes navigation or control appear or not
showIndicatorboolean-falseStatus that makes indicator appear or not
rationumberyesfalseSets image aspec ratio, same argument taken from Image component
titleSizestringyes-Sets title font size (can use px or rem)