layout/DSCardCarousel
DSCardCarousel
layoutHorizontal scrolling carousel of cards with spacing and peek effect.
iOSmacOS
Purpose
Use to showcase featured content, products, or cards in a swipeable horizontal layout with visible peek of next card.
Interactive Reference
Live showroom
Need the full visual surface?
Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().
Best for exploring:
variants, states, categories, and real app examples in one place.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| cardsreq | [CardContent] | โ | Array of card content |
| cardWidth | CGFloat | 280 | Width of each card |
| spacing | CGFloat | DSSpacing.md | Space between cards |
Examples
Featured products
Carousel of product cards.
swift
DSCardCarousel(
cards: featuredProducts.map { product in
CardContent(
title: product.name,
subtitle: product.price,
image: product.image
)
},
cardWidth: 300
)Usage Guidelines
- Use for 3-10 featured items
- Cards should have consistent height
- Peek effect encourages horizontal scrolling