Carousel

画像やテキストなどの要素をカルーセルのように循環表示するためのスライドショーコンポーネントです。

いつ使用するか

同じレベルのコンテンツのグループがある場合。コンテンツスペースが不十分な場合、回転ドアの形でスペースを節約するために使用できます。写真やカードのグループによく使用されます。

使用例

1
2
3
4

自動再生

`autoplay`プロパティを追加することで、自動循環を有効にできます。`autoplayInterval`を使用して速度を制御できます(ミリ秒単位、デフォルトは3000)。カルーセルにカーソルを合わせると自動的に一時停止します。

A
B
C

コントロールとアスペクト比

ナビゲーション矢印を表示するには`showControls`プロパティを使用します。`aspectRatio`プロパティは一貫した寸法を強制するのに役立ちます(`video`、`square`、または`auto`)。

1
2

API リファレンス

プロパティ
説明
タイプ
デフォルト

autoplay

Whether to automatically cycle through the items. boolean false

autoplayInterval

The interval in milliseconds for autoplay. number 3000

showDots

Whether to show the pagination dots. boolean true

showControls

Whether to show the next/previous navigation arrows. boolean false

aspectRatio

Enforces a specific aspect ratio for the carousel. 'video' | 'square' | 'auto' 'auto'

class

Additional CSS classes to apply to the carousel container. string -