Width
300px
Aspect Ratio
1.25
Peek
0px
Gap
16px
Radius
12px
Delay
3000ms

More components in Pro

Galleries, cards and interactive pieces for pages that need more than the basics.

View all 255
21 properties
itemsArray<CarouselItem | string | ReactNode>DEFAULT_ITEMSCards to show. Objects with image, icon, title, description and alt get the built-in card, strings are used as image URLs and React elements are rendered as they are.
baseWidthnumber | string300Width of the carousel in px, or any CSS width. It never grows past its container.
aspectRatio1.25Width of a card divided by its height.
peekSpace on each side of the active card where the neighbours show, in px. Works with slide and scale.
gap16Space between the cards in px.
radius12Corner radius of the cards in px.
frameHolds the cards and controls in a panel that masks the cards as they slide out. Without it the cards fade out at the edges.
effect'tilt' | 'slide' | 'scale' | 'fade' | 'cube''tilt'How the cards move from one to the next.
indicator'dots' | 'bars' | 'counter' | 'none''dots'Navigation under the cards. Bars fill up with the autoplay timer.
arrowsShows previous and next buttons.
autoplayMoves to the next card on a timer.
autoplayDelay3000Time on each card in ms while autoplay is on.
pauseOnHoverPauses autoplay while the pointer is over the carousel.
loopWraps around from the last card to the first and back.
draggableLets people drag, swipe or scroll sideways through the cards.
roundTurns the cards into circles.
initialIndexCard shown first.
theme'dark' | 'light''dark'Color scheme of the cards, frame and controls.
onChange(index: number) => voidCalled with the index of the new card whenever it changes.
Extra class names for the carousel.
Inline styles for the carousel.
itemsArray<CarouselItem | string | ReactNode>

Cards to show. Objects with image, icon, title, description and alt get the built-in card, strings are used as image URLs and React elements are rendered as they are.

DefaultDEFAULT_ITEMS
baseWidthnumber | string

Width of the carousel in px, or any CSS width. It never grows past its container.

Default300
aspectRationumber

Width of a card divided by its height.

Default1.25
peeknumber

Space on each side of the active card where the neighbours show, in px. Works with slide and scale.

gapnumber

Space between the cards in px.

Default16
radiusnumber

Corner radius of the cards in px.

Default12
frameboolean

Holds the cards and controls in a panel that masks the cards as they slide out. Without it the cards fade out at the edges.

effect'tilt' | 'slide' | 'scale' | 'fade' | 'cube'

How the cards move from one to the next.

Default'tilt'
indicator'dots' | 'bars' | 'counter' | 'none'

Navigation under the cards. Bars fill up with the autoplay timer.

Default'dots'
arrowsboolean

Shows previous and next buttons.

autoplayboolean

Moves to the next card on a timer.

autoplayDelaynumber

Time on each card in ms while autoplay is on.

Default3000
pauseOnHoverboolean

Pauses autoplay while the pointer is over the carousel.

loopboolean

Wraps around from the last card to the first and back.

draggableboolean

Lets people drag, swipe or scroll sideways through the cards.

roundboolean

Turns the cards into circles.

initialIndexnumber

Card shown first.

theme'dark' | 'light'

Color scheme of the cards, frame and controls.

Default'dark'
onChange(index: number) => void

Called with the index of the new card whenever it changes.

Extra class names for the carousel.

Inline styles for the carousel.

Dependencies

2 required packages

npm install @hugeicons/react @hugeicons/core-free-icons