← Back to Tv Material
CarouselItem
Component
in
Tv Material
. Since 1.0.0-alpha01Overview
Code Examples
Video
This composable is intended for use in Carousel. A composable that has
- a background layer that is rendered as soon as the composable is visible.
- an overlay layer that is rendered after a delay of overlayEnterTransitionStartDelayMillis.
@param overlayEnterTransitionStartDelayMillis time between the rendering of the background and the overlay. @param overlayEnterTransition animation used to bring the overlay into view. @param overlayExitTransition animation used to remove the overlay from view. @param background composable defining the background of the slide. @param overlay composable defining the content overlaid on the background.
Overloads
CarouselItem
@Suppress("IllegalExperimentalApiUsage")
@OptIn(ExperimentalComposeUiApi::class, ExperimentalFoundationApi::class)
@ExperimentalTvMaterialApi
@Composable
fun CarouselItem(
background: @Composable () -> Unit,
modifier: Modifier = Modifier,
overlayEnterTransitionStartDelayMillis: Long =
CarouselItemDefaults.OverlayEnterTransitionStartDelayMillis,
overlayEnterTransition: EnterTransition = CarouselItemDefaults.OverlayEnterTransition,
overlayExitTransition: ExitTransition = CarouselItemDefaults.OverlayExitTransition,
overlay: @Composable () -> Unit
)
Parameters
Name | Description |
---|---|
overlayEnterTransitionStartDelayMillis | time between the rendering of the background and the overlay. |
overlayEnterTransition | animation used to bring the overlay into view. |
overlayExitTransition | animation used to remove the overlay from view. |
background | composable defining the background of the slide. |
overlay | composable defining the content overlaid on the background |