<Carousel> Component

<Carousel> is a slideshow component for cycling through images, slides, or another elements.

Here the demo:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Installing <Carousel> Component

There are 2 ways to install <Carousel> component into your react app project:

  • Install the Specific Package of <Carousel> Component
  • Install the Whole Reusable-UI Component Pack, including the <Carousel> Component

infiniteLoop Property

Makes an infinite illusion as if the <Carousel> has infinite items when the user scrolls the <Carousel>.

The possible values are:

  • undefined
  • false
  • true

Here the preview:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Show code

scrollingRef Property

Gets the DOM element reference of the scrolling container used for an external <Navscroll>.


Here the preview:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Show code

Variant Properties

The alternative appearances of the <Carousel> layout without changing the <Carousel>'s functionality.

size Property

Defines the alternative size of the <Carousel>.

The possible values are:

  • undefined
  • 'sm'
  • 'md'
  • 'lg'

Here the preview:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Show code

theme Property

Defines the contextual theme of the <Carousel>.

The possible values are:

  • undefined
  • 'primary'
  • 'secondary'
  • 'success'
  • 'info'
  • 'warning'
  • 'danger'
  • 'light'
  • 'dark'

Here the preview:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Show code

gradient Property

Activates a 3D mode of the <Carousel>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Show code

outlined Property

Activates an outlined mode (background-less, contrast foreground, and contrast border) of the <Carousel>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Show code

mild Property

Activates a mild mode (mild background, contrast foreground, and contrast border) of the <Carousel>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Show code

nude Property

Activates an nude mode (background-less, padding-less, and border-less) of the <Carousel>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview
  • waves
  • leaf
  • Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem accusantium

  • building
  • street
  • flower
  • wood

Show code

Component Properties

Overwrites the internal (sub) components used as the composition of <Carousel> component.

basicComponent Property

Overwrites the internal <Basic> component used as the base of <Carousel> component.

<Carousel basicComponent={
    <MyCustomBasic />
} />

prevButtonComponent Property

Overwrites the internal <Button> component used as the <Carousel>'s prev button.

<Carousel prevButtonComponent={
    <MyCustomPrevButton />
} />

nextButtonComponent Property

Overwrites the internal <Button> component used as the <Carousel>'s next button.

<Carousel nextButtonComponent={
    <MyCustomNextButton />
} />

navscrollComponent Property

Overwrites the internal <Navscroll> component used as the composition of <Carousel> component.

<Carousel navscrollComponent={
    <MyCustomNavscroll />
} />

Variables

There are several variables of <Carousel> you can customize. Changing the variables affects all <Carousel> instance and other components that depend on <Carousel>.

Here the exposed variables:

  • Backgrounds, Foregrounds, Borders, & Rings
    • navBtnBorderWidth

      The thickness of border (stroke) of the prev/next button.

    • navBtnBorderRadius

      The rounded corner radius of the prev/next button.

  • Spacings
    • paddingInline

      The inner spacing on the left & right of the <Carousel>.

    • paddingBlock

      The inner spacing on the top & bottom of the <Carousel>.

    • navMarginBlockEnd

      The default outer spacing on the bottom of the navigation bullets.

    • navMarginBlockEndSm

      The outer spacing on the bottom of the navigation bullets when size='sm'.

    • navMarginBlockEndLg

      The outer spacing on the bottom of the navigation bullets when size='lg'.


The example of accessing, modifying, & adding variables:

Show code