2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

Swiper

Updated: October 18, 2025
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. 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. By default, the Swiper displays dot indicators below the carousel. The active dot is highlighted and slightly scaled for better visibility. 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. Customize the aspect ratio of the carousel to fit your design needs. Supports standard aspect ratio values. You can place custom content inside the slides as ReactNode, not just images.
Prop
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.
string
unoptimized
Skip the framework image optimizer.
booleanfalse
indicator
Show the dots under the slides.
booleantrue
…and every FlexProps propinherited
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club