CarouselView
The CarouselLayout
displays a list of tracks horizontally or vertically. Depending on the size of the container, the carousel will display as many tiles as possible and overflows the rest. The CarouselLayout uses the useVisualStableUpdate
hook to ensure that tile reordering due to track updates is visually stable but still moves the important tiles (speaking participants) to the front.
Import
import { CarouselView } from '@livekit/components-react';
Usage
const tracks = useTracks();<CarouselLayout tracks={tracks}><ParticipantTile /></CarouselLayout>;
Properties
(Optional) Place the tiles vertically or horizontally next to each other. If undefined orientation is guessed by the dimensions of the container.