Skip to main content

Carousel

A content surface for displaying multiple images or cards horizontally.

Examples

The most basic carousel has no controls. On touch devices, it can be swiped. On desktop, clicking on the next image will scroll it into view. The carousel scrolls infinitely horizontally as there is no "back" button.

You may specify how many slides to show in three ways:

  • As a fixed number (1)
  • Based on the component size:
    {
    componentSizes: {
    500: 3,
    700: 4,
    }
    }
  • Based on the window size or breakpoint:
    {
    windowSizes: {
    'xs': 1,
    'sm': 2,
    600: 3
    }
    }

Props

NameTypeDefault ValueRequiredDescription
controlsbooleanfalseNoShow previous/next controls?
progressbooleanfalseNoShould progress be shown? `controls` must also be `true`
slidesToShowstring | number | SlidesToShow1NoHow many slides to show, with optional component or screen breakpoints