The carousel component typically has a container element that holds all the slides and defines the overall layout and dimension of the component.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Usage

import { Carousel } from 'bio-bind-ui';
<Carousel
  config={{
    autoplay: true,
    autoplaySpeed: 3000,
    showIndicators: true,
    showNavigation: true,
    speed: 200,
  }}
  id='carousel'
  items={[
    {
      content:
        'Lorem Ipsum is simply dummy text of the printing and typesetting industry',
      href: 'https://picsum.photos/id/11/400/200',
      image: 'https://picsum.photos/id/11/400/200',
      title: 'Lorem Ipsum',
    },
    {
      content:
        'Lorem Ipsum is simply dummy text of the printing and typesetting industry',
      href: 'https://picsum.photos/id/11/400/200',
      image: 'https://picsum.photos/id/11/400/200',
      title: 'Lorem Ipsum',
    },
  ]}
  name='carousel'
  radius='none'
  slideType='full'
  style={{}}
/>

Examples

Slide Type

Use slide type for change the type of carousel slide: full or boxed


Radius (Optional)

Use radius type for change the corner radius of carousel: none, xs, sm, md, xl, full


Mode (Optional)

Use mode type for change the color mode of carousel: light or dark


Props

PropsRequiredDefaultTypeDescription
slideTypefalsefullfull boxedFor change slideType of the carousel slide.
idtruecarouselstringFor set id of the carousel component.
nametruecarouselstringFor set name of the carousel component.
itemstrue-Item[]For display the data of carousel.
radiusfalsenonenone xs sm md xl fullFor change corner radius of the carousel slide.
configtrue-carouselconfigFor change the config of carousel, like speed or autoplay.
stylefalse-CSSPropertiesFor custom styles for the carousel component.
speedfalse-numberFor setting the speed of carousel transition.
autoplayfalse-booleanFor enabling autoplay of the carousel.
autoplaySpeedfalse-numberFor setting the autoplay speed in milliseconds.
showIndicatorsfalse-booleanFor displaying carousel indicators.
showNavigationfalse-booleanFor displaying navigation controls (left and right arrows).
imagefalse-stringFor setting the image URL of a carousel slide.
hreffalse-stringFor setting the hyperlink for each carousel slide.
titlefalse-stringFor setting the title of the carousel slide.
contentfalse-string ReactNodeFor setting content within the carousel slide.
extrasfalse-Record<string, string>For adding extra attributes or data to the carousel.
controlLeftfalse-ReactNodeFor custom left control (navigation).
controlRightfalse-ReactNodeFor custom right control (navigation).
indicatorfalse-ReactNodeFor customizing the indicator of the carousel.
heightfalse-numberFor setting the height of the carousel component.
bodyBuilderfalse-string ReactNodeFor custom content rendering inside the carousel.
BIND © Biofarma Innovate Next-level Design .