Skip to content
TrademarkTrademark
Docs
Components

Swiper

Updated: October 11, 2026
View on GitHub

An interactive carousel that uses native CSS scroll-snap for smooth, performant scrolling. Features native touch/swipe gestures on mobile and drag-to-scroll on desktop for seamless navigation between slides.

Five components scroll a row
Pick by the job. Carousel shows one image or slide at a time, with line or thumbnail indicators and autoplay. Swiper is a touch-first gallery on native scroll snapping. ScrollContainer moves a run of cards or tiles, with drag, wrap-around, markers and proximity scaling. Scroller scrolls overflowing chips, tabs or cards behind arrow buttons and edge fades. AutoScroll is a marquee that moves on its own. 3.0 plans to consolidate them.

Interactions

The Swiper uses native CSS scroll-snap, providing smooth touch gestures on mobile, trackpad scrolling, and mouse drag-to-scroll on desktop. Simply click and drag to navigate between slides.

Indicators

By default, the Swiper displays dot indicators below the carousel. The active dot is highlighted and slightly scaled for better visibility.

Controls

The controls prop supports three options: true (appear on hover), false (hidden), or "contained" (always visible inside the carousel). Buttons are automatically hidden when at the first or last slide.

Aspect ratio

Customize the aspect ratio of the carousel to fit your design needs. Supports standard aspect ratio values.

Custom content

You can place custom content inside the slides as ReactNode, not just images.

API Reference

Type
Default
itemsrequired
The slides, each with its source and alt text.
SwiperItem[][]
controls
Show the chevrons. "contained" keeps them inside the frame.
booleancontained
true
priority
Load the first slide eagerly, for one above the fold.
booleanfalse
stretch
Drop the intrinsic ratio and take sizing from the parent instead.
booleanfalse
aspectRatio
Frame ratio, held as the width changes.
string16 / 9
sizes
The sizes attribute passed to the images.
stringnumber
—
unoptimized
Skip the framework image optimizer.
booleanfalse
indicator
Show the dots under the slides.
booleantrue
…and every FlexProps propinherited—
Edit this page on GitHub