Plain HTML first
Components start from semantic markup and native behavior.
Data display
A row of slides on a native scroll-snap track, with previous and next buttons and indicators.
| Class name | Type | Description |
|---|---|---|
carouselplf:carousel | Component | A row of slides with its controls |
carousel-viewportplf:carousel-viewport | Part | The track and its overlaid buttons |
carousel-trackplf:carousel-track | Part | The scroll-snap row of slides |
carousel-itemplf:carousel-item | Part | A slide |
carousel-mediaplf:carousel-media | Part | An image cropped to 16:9 |
carousel-controlplf:carousel-control | Part | A round icon button |
carousel-iconplf:carousel-icon | Part | Your own SVG: the play button's, or one in place of a drawn chevron; an icon class there doesn't need it |
carousel-footerplf:carousel-footer | Part | The row below the slides |
carousel-indicatorsplf:carousel-indicators | Part | Holds the generated indicators |
carousel-control-previousplf:carousel-control-previous | Modifier | The previous button, at the start |
carousel-control-nextplf:carousel-control-next | Modifier | The next button, at the end |
carousel-control-playplf:carousel-control-play | Modifier | A quiet play and pause button |
Name the carousel and both buttons, and author the buttons and indicators hidden: without JavaScript the track stays a plain scroller.
<section class="carousel" data-plf-carousel aria-label="Sample photos">
<div class="carousel-viewport">
<div class="carousel-track" data-plf-carousel-track tabindex="0">
<div class="carousel-item">
<img class="carousel-media" src="/previews/assets/gallery-beach.svg" alt="A palm tree on a sunny beach">
</div>
<div class="carousel-item">
<img class="carousel-media" src="/previews/assets/gallery-forest.svg" alt="Pine trees below green hills">
</div>
<div class="carousel-item">
<img class="carousel-media" src="/previews/assets/gallery-city.svg" alt="City towers at sunset">
</div>
</div>
<button class="carousel-control carousel-control-previous" data-plf-carousel-previous hidden></button>
<button class="carousel-control carousel-control-next" data-plf-carousel-next hidden></button>
</div>
<div class="carousel-footer">
<div class="carousel-indicators" data-plf-carousel-indicators hidden></div>
</div>
</section><section class="plf:carousel" data-plf-carousel aria-label="Sample photos">
<div class="plf:carousel-viewport">
<div class="plf:carousel-track" data-plf-carousel-track tabindex="0">
<div class="plf:carousel-item">
<img class="plf:carousel-media" src="/previews/assets/gallery-beach.svg" alt="A palm tree on a sunny beach">
</div>
<div class="plf:carousel-item">
<img class="plf:carousel-media" src="/previews/assets/gallery-forest.svg" alt="Pine trees below green hills">
</div>
<div class="plf:carousel-item">
<img class="plf:carousel-media" src="/previews/assets/gallery-city.svg" alt="City towers at sunset">
</div>
</div>
<button class="plf:carousel-control plf:carousel-control-previous" data-plf-carousel-previous hidden></button>
<button class="plf:carousel-control plf:carousel-control-next" data-plf-carousel-next hidden></button>
</div>
<div class="plf:carousel-footer">
<div class="plf:carousel-indicators" data-plf-carousel-indicators hidden></div>
</div>
</section>import {
Carousel, CarouselFooter, CarouselIndicators, CarouselItem, CarouselNext, CarouselPrevious, CarouselTrack, CarouselViewport,
} from '@pelatform/react';
export function Example() {
return (
<Carousel aria-label="Sample photos">
<CarouselViewport>
<CarouselTrack>
<CarouselItem>
<img className="carousel-media" src="/previews/assets/gallery-beach.svg" alt="A palm tree on a sunny beach" />
</CarouselItem>
<CarouselItem>
<img className="carousel-media" src="/previews/assets/gallery-forest.svg" alt="Pine trees below green hills" />
</CarouselItem>
<CarouselItem>
<img className="carousel-media" src="/previews/assets/gallery-city.svg" alt="City towers at sunset" />
</CarouselItem>
</CarouselTrack>
<CarouselPrevious />
<CarouselNext />
</CarouselViewport>
<CarouselFooter>
<CarouselIndicators />
</CarouselFooter>
</Carousel>
);
}import {
Carousel, CarouselFooter, CarouselIndicators, CarouselItem, CarouselNext, CarouselPrevious, CarouselTrack, CarouselViewport,
} from '@pelatform/react/prefixed';
export function Example() {
return (
<Carousel aria-label="Sample photos">
<CarouselViewport>
<CarouselTrack>
<CarouselItem>
<img className="plf:carousel-media" src="/previews/assets/gallery-beach.svg" alt="A palm tree on a sunny beach" />
</CarouselItem>
<CarouselItem>
<img className="plf:carousel-media" src="/previews/assets/gallery-forest.svg" alt="Pine trees below green hills" />
</CarouselItem>
<CarouselItem>
<img className="plf:carousel-media" src="/previews/assets/gallery-city.svg" alt="City towers at sunset" />
</CarouselItem>
</CarouselTrack>
<CarouselPrevious />
<CarouselNext />
</CarouselViewport>
<CarouselFooter>
<CarouselIndicators />
</CarouselFooter>
</Carousel>
);
}Put the buttons in the footer, after the indicators, so they do not cover the slides.
<section class="carousel" data-plf-carousel aria-label="Sample cards" style="--plf-carousel-per-view: 3; --plf-carousel-slide-min-size: 220px">
<div class="carousel-viewport">
<div class="carousel-track" data-plf-carousel-track tabindex="0">
<div class="carousel-item">
<article class="card">
<header class="card-header">
<h4 class="card-title">Plain HTML first</h4>
<p class="card-description">Components start from semantic markup and native behavior.</p>
</header>
<div class="card-body">
<span class="badge badge-outline">Guide</span>
</div>
<footer class="card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="carousel-item">
<article class="card">
<header class="card-header">
<h4 class="card-title">Scoped by default</h4>
<p class="card-description">Every rule lives inside a root wrapper.</p>
</header>
<div class="card-body">
<span class="badge badge-outline">Architecture</span>
</div>
<footer class="card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="carousel-item">
<article class="card">
<header class="card-header">
<h4 class="card-title">Tokens you can override</h4>
<p class="card-description">Change colors, radii and spacing from a root or one element.</p>
</header>
<div class="card-body">
<span class="badge badge-outline">Theming</span>
</div>
<footer class="card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="carousel-item">
<article class="card">
<header class="card-header">
<h4 class="card-title">Full or Modular</h4>
<p class="card-description">Load one bundle or only the components a page needs.</p>
</header>
<div class="card-body">
<span class="badge badge-outline">Setup</span>
</div>
<footer class="card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="carousel-item">
<article class="card">
<header class="card-header">
<h4 class="card-title">Right-to-left ready</h4>
<p class="card-description">Logical properties mirror layouts without extra classes.</p>
</header>
<div class="card-body">
<span class="badge badge-outline">Guide</span>
</div>
<footer class="card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="carousel-item">
<article class="card">
<header class="card-header">
<h4 class="card-title">Accessible states</h4>
<p class="card-description">Native and ARIA states drive the styles, not extra classes.</p>
</header>
<div class="card-body">
<span class="badge badge-outline">Accessibility</span>
</div>
<footer class="card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
</div>
</div>
<div class="carousel-footer">
<div class="carousel-indicators" data-plf-carousel-indicators hidden></div>
<button class="carousel-control carousel-control-previous" data-plf-carousel-previous hidden></button>
<button class="carousel-control carousel-control-next" data-plf-carousel-next hidden></button>
</div>
</section><section class="plf:carousel" data-plf-carousel aria-label="Sample cards" style="--plf-carousel-per-view: 3; --plf-carousel-slide-min-size: 220px">
<div class="plf:carousel-viewport">
<div class="plf:carousel-track" data-plf-carousel-track tabindex="0">
<div class="plf:carousel-item">
<article class="plf:card">
<header class="plf:card-header">
<h4 class="plf:card-title">Plain HTML first</h4>
<p class="plf:card-description">Components start from semantic markup and native behavior.</p>
</header>
<div class="plf:card-body">
<span class="plf:badge plf:badge-outline">Guide</span>
</div>
<footer class="plf:card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="plf:carousel-item">
<article class="plf:card">
<header class="plf:card-header">
<h4 class="plf:card-title">Scoped by default</h4>
<p class="plf:card-description">Every rule lives inside a root wrapper.</p>
</header>
<div class="plf:card-body">
<span class="plf:badge plf:badge-outline">Architecture</span>
</div>
<footer class="plf:card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="plf:carousel-item">
<article class="plf:card">
<header class="plf:card-header">
<h4 class="plf:card-title">Tokens you can override</h4>
<p class="plf:card-description">Change colors, radii and spacing from a root or one element.</p>
</header>
<div class="plf:card-body">
<span class="plf:badge plf:badge-outline">Theming</span>
</div>
<footer class="plf:card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="plf:carousel-item">
<article class="plf:card">
<header class="plf:card-header">
<h4 class="plf:card-title">Full or Modular</h4>
<p class="plf:card-description">Load one bundle or only the components a page needs.</p>
</header>
<div class="plf:card-body">
<span class="plf:badge plf:badge-outline">Setup</span>
</div>
<footer class="plf:card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="plf:carousel-item">
<article class="plf:card">
<header class="plf:card-header">
<h4 class="plf:card-title">Right-to-left ready</h4>
<p class="plf:card-description">Logical properties mirror layouts without extra classes.</p>
</header>
<div class="plf:card-body">
<span class="plf:badge plf:badge-outline">Guide</span>
</div>
<footer class="plf:card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
<div class="plf:carousel-item">
<article class="plf:card">
<header class="plf:card-header">
<h4 class="plf:card-title">Accessible states</h4>
<p class="plf:card-description">Native and ARIA states drive the styles, not extra classes.</p>
</header>
<div class="plf:card-body">
<span class="plf:badge plf:badge-outline">Accessibility</span>
</div>
<footer class="plf:card-actions">
<a href="#">Read article</a>
</footer>
</article>
</div>
</div>
</div>
<div class="plf:carousel-footer">
<div class="plf:carousel-indicators" data-plf-carousel-indicators hidden></div>
<button class="plf:carousel-control plf:carousel-control-previous" data-plf-carousel-previous hidden></button>
<button class="plf:carousel-control plf:carousel-control-next" data-plf-carousel-next hidden></button>
</div>
</section>import type { CSSProperties } from 'react';
import {
Badge, CardBody, CardDescription, CardTitle, Carousel, CarouselFooter, CarouselIndicators, CarouselItem, CarouselNext, CarouselPrevious,
CarouselTrack, CarouselViewport,
} from '@pelatform/react';
const articles = [
{ title: 'Plain HTML first', description: 'Components start from semantic markup and native behavior.', topic: 'Guide' },
{ title: 'Scoped by default', description: 'Every rule lives inside a root wrapper.', topic: 'Architecture' },
{ title: 'Tokens you can override', description: 'Change colors, radii and spacing from a root or one element.', topic: 'Theming' },
{ title: 'Full or Modular', description: 'Load one bundle or only the components a page needs.', topic: 'Setup' },
{ title: 'Right-to-left ready', description: 'Logical properties mirror layouts without extra classes.', topic: 'Guide' },
{ title: 'Accessible states', description: 'Native and ARIA states drive the styles, not extra classes.', topic: 'Accessibility' },
];
export function Example() {
return (
<Carousel aria-label="Sample cards" perView={3} style={{ '--plf-carousel-slide-min-size': '220px' } as CSSProperties}>
<CarouselViewport>
<CarouselTrack>
{articles.map(article => (
<CarouselItem key={article.title}>
<article className="card">
<header className="card-header">
<CardTitle level={4}>{article.title}</CardTitle>
<CardDescription>{article.description}</CardDescription>
</header>
<CardBody>
<Badge variant="outline">{article.topic}</Badge>
</CardBody>
<footer className="card-actions">
<a href="#">Read article</a>
</footer>
</article>
</CarouselItem>
))}
</CarouselTrack>
</CarouselViewport>
<CarouselFooter>
<CarouselIndicators />
<CarouselPrevious />
<CarouselNext />
</CarouselFooter>
</Carousel>
);
}import type { CSSProperties } from 'react';
import {
Badge, CardBody, CardDescription, CardTitle, Carousel, CarouselFooter, CarouselIndicators, CarouselItem, CarouselNext, CarouselPrevious,
CarouselTrack, CarouselViewport,
} from '@pelatform/react/prefixed';
const articles = [
{ title: 'Plain HTML first', description: 'Components start from semantic markup and native behavior.', topic: 'Guide' },
{ title: 'Scoped by default', description: 'Every rule lives inside a root wrapper.', topic: 'Architecture' },
{ title: 'Tokens you can override', description: 'Change colors, radii and spacing from a root or one element.', topic: 'Theming' },
{ title: 'Full or Modular', description: 'Load one bundle or only the components a page needs.', topic: 'Setup' },
{ title: 'Right-to-left ready', description: 'Logical properties mirror layouts without extra classes.', topic: 'Guide' },
{ title: 'Accessible states', description: 'Native and ARIA states drive the styles, not extra classes.', topic: 'Accessibility' },
];
export function Example() {
return (
<Carousel aria-label="Sample cards" perView={3} style={{ '--plf-carousel-slide-min-size': '220px' } as CSSProperties}>
<CarouselViewport>
<CarouselTrack>
{articles.map(article => (
<CarouselItem key={article.title}>
<article className="plf:card">
<header className="plf:card-header">
<CardTitle level={4}>{article.title}</CardTitle>
<CardDescription>{article.description}</CardDescription>
</header>
<CardBody>
<Badge variant="outline">{article.topic}</Badge>
</CardBody>
<footer className="plf:card-actions">
<a href="#">Read article</a>
</footer>
</article>
</CarouselItem>
))}
</CarouselTrack>
</CarouselViewport>
<CarouselFooter>
<CarouselIndicators />
<CarouselPrevious />
<CarouselNext />
</CarouselFooter>
</Carousel>
);
}Autoplay needs the play button, the way to stop the motion, and starts paused when the user prefers reduced motion.
<section class="carousel" data-plf-carousel aria-label="Sample photos" data-plf-autoplay="5000">
<div class="carousel-viewport">
<div class="carousel-track" data-plf-carousel-track tabindex="0">
<div class="carousel-item">
<img class="carousel-media" src="/previews/assets/gallery-beach.svg" alt="A palm tree on a sunny beach">
</div>
<div class="carousel-item">
<img class="carousel-media" src="/previews/assets/gallery-forest.svg" alt="Pine trees below green hills">
</div>
<div class="carousel-item">
<img class="carousel-media" src="/previews/assets/gallery-city.svg" alt="City towers at sunset">
</div>
</div>
<button class="carousel-control carousel-control-previous" data-plf-carousel-previous hidden></button>
<button class="carousel-control carousel-control-next" data-plf-carousel-next hidden></button>
</div>
<div class="carousel-footer">
<button class="carousel-control carousel-control-play" data-plf-carousel-play hidden>
<span class="icon icon-player-pause"></span>
<span class="icon icon-player-play"></span>
</button>
<div class="carousel-indicators" data-plf-carousel-indicators hidden></div>
</div>
</section><section class="plf:carousel" data-plf-carousel aria-label="Sample photos" data-plf-autoplay="5000">
<div class="plf:carousel-viewport">
<div class="plf:carousel-track" data-plf-carousel-track tabindex="0">
<div class="plf:carousel-item">
<img class="plf:carousel-media" src="/previews/assets/gallery-beach.svg" alt="A palm tree on a sunny beach">
</div>
<div class="plf:carousel-item">
<img class="plf:carousel-media" src="/previews/assets/gallery-forest.svg" alt="Pine trees below green hills">
</div>
<div class="plf:carousel-item">
<img class="plf:carousel-media" src="/previews/assets/gallery-city.svg" alt="City towers at sunset">
</div>
</div>
<button class="plf:carousel-control plf:carousel-control-previous" data-plf-carousel-previous hidden></button>
<button class="plf:carousel-control plf:carousel-control-next" data-plf-carousel-next hidden></button>
</div>
<div class="plf:carousel-footer">
<button class="plf:carousel-control plf:carousel-control-play" data-plf-carousel-play hidden>
<span class="plf:icon plf:icon-player-pause"></span>
<span class="plf:icon plf:icon-player-play"></span>
</button>
<div class="plf:carousel-indicators" data-plf-carousel-indicators hidden></div>
</div>
</section>import {
Carousel, CarouselFooter, CarouselIndicators, CarouselItem, CarouselNext, CarouselPlay, CarouselPrevious, CarouselTrack, CarouselViewport,
Icon,
} from '@pelatform/react';
export function Example() {
return (
<Carousel aria-label="Sample photos" autoplay={5000}>
<CarouselViewport>
<CarouselTrack>
<CarouselItem>
<img className="carousel-media" src="/previews/assets/gallery-beach.svg" alt="A palm tree on a sunny beach" />
</CarouselItem>
<CarouselItem>
<img className="carousel-media" src="/previews/assets/gallery-forest.svg" alt="Pine trees below green hills" />
</CarouselItem>
<CarouselItem>
<img className="carousel-media" src="/previews/assets/gallery-city.svg" alt="City towers at sunset" />
</CarouselItem>
</CarouselTrack>
<CarouselPrevious />
<CarouselNext />
</CarouselViewport>
<CarouselFooter>
<CarouselPlay>
<Icon name="player-pause" />
<Icon name="player-play" />
</CarouselPlay>
<CarouselIndicators />
</CarouselFooter>
</Carousel>
);
}import {
Carousel, CarouselFooter, CarouselIndicators, CarouselItem, CarouselNext, CarouselPlay, CarouselPrevious, CarouselTrack, CarouselViewport,
Icon,
} from '@pelatform/react/prefixed';
export function Example() {
return (
<Carousel aria-label="Sample photos" autoplay={5000}>
<CarouselViewport>
<CarouselTrack>
<CarouselItem>
<img className="plf:carousel-media" src="/previews/assets/gallery-beach.svg" alt="A palm tree on a sunny beach" />
</CarouselItem>
<CarouselItem>
<img className="plf:carousel-media" src="/previews/assets/gallery-forest.svg" alt="Pine trees below green hills" />
</CarouselItem>
<CarouselItem>
<img className="plf:carousel-media" src="/previews/assets/gallery-city.svg" alt="City towers at sunset" />
</CarouselItem>
</CarouselTrack>
<CarouselPrevious />
<CarouselNext />
</CarouselViewport>
<CarouselFooter>
<CarouselPlay>
<Icon name="player-pause" />
<Icon name="player-play" />
</CarouselPlay>
<CarouselIndicators />
</CarouselFooter>
</Carousel>
);
}Carousel needs JavaScript. The Full script (pelatform-ui.min.js) starts every component on page load, with no code of your own; with ESM imports, call init() yourself, as in Installation. For markup you add later, see Dynamic content.
<link rel="stylesheet" href="pelatform-ui.min.css">
<link rel="stylesheet" href="icons/icons.min.css">
<script src="pelatform-ui.min.js" defer></script><link rel="stylesheet" href="core/pelatform-ui-core.min.css">
<link rel="stylesheet" href="components/card.min.css">
<link rel="stylesheet" href="components/badge.min.css">
<link rel="stylesheet" href="components/carousel.min.css">
<link rel="stylesheet" href="icons/icons.min.css">
<script src="core/pelatform-ui-core.min.js" defer></script>
<script src="components/carousel.min.js" defer></script>
<script>document.addEventListener('DOMContentLoaded', () => PLF.init());</script><link rel="stylesheet" href="pelatform-ui.prefixed.min.css">
<link rel="stylesheet" href="icons/icons.prefixed.min.css">
<script src="pelatform-ui.min.js" defer></script><link rel="stylesheet" href="core/pelatform-ui-core.prefixed.min.css">
<link rel="stylesheet" href="components/card.prefixed.min.css">
<link rel="stylesheet" href="components/badge.prefixed.min.css">
<link rel="stylesheet" href="components/carousel.prefixed.min.css">
<link rel="stylesheet" href="icons/icons.prefixed.min.css">
<script src="core/pelatform-ui-core.min.js" defer></script>
<script src="components/carousel.min.js" defer></script>
<script>document.addEventListener('DOMContentLoaded', () => PLF.init());</script>| Attribute | Purpose |
|---|---|
data-plf-carousel |
Marks the carousel, named with aria-label or aria-labelledby |
data-plf-carousel-track |
Marks the track, with tabindex="0"; its children, at least two, are the slides |
data-plf-carousel-slide |
Optional on the slides; once one slide has it, every slide needs it |
data-plf-carousel-previous, data-plf-carousel-next |
Mark the <button> controls, authored hidden; unnamed, they are named Previous slide and Next slide |
data-plf-carousel-indicators |
Marks an optional container for the generated indicators, authored hidden; unnamed, it is named Choose slide |
data-plf-autoplay |
The interval in milliseconds, at least 1000; rotation holds on hover and focus and stops when the user navigates |
data-plf-carousel-play |
Marks the play <button>, required with autoplay and authored hidden |
data-plf-carousel-icon |
Optional: pause or play on each icon in the play button; otherwise its first icon is pause and its second play |
data-plf-slide-label |
On the carousel, names slides that have no name; {index} of {count} by default |
data-plf-indicator-label |
Indicator names; Go to slide {index} by default |
data-plf-pause-label, data-plf-play-label |
Play button names; Stop automatic slide show and Start automatic slide show by default |
data-plf-previous-label, data-plf-next-label, data-plf-indicators-label |
On the carousel, names for unnamed controls; Previous slide, Next slide and Choose slide by default |
| Method | Behavior |
|---|---|
PLF. |
Returns the instance, creating it for valid markup |
PLF. |
Returns the instance or null |
instance. |
Scrolls to a stop, counted from 0 |
instance., instance. |
Scroll one stop, without wrapping |
instance., instance. |
Start or pause autoplay, on a carousel with data-plf-autoplay |
instance. |
Returns {index, count, playing} |
instance. |
Stops autoplay and removes listeners, indicators and added attributes |
| Event | When |
|---|---|
plf: |
After scrolling settles on a new stop |
The event’s detail:
| Property | Value |
|---|---|
instance |
The Carousel instance |
index |
The new stop, counted from 0 |
previous |
The stop before, counted from 0 |
slide |
The first slide of the stop |
reason |
previous, next, indicator, keyboard, autoplay, api or scroll |
| Key | Action |
|---|---|
| Left Arrow, Right Arrow | Move one stop from the track, the previous or next button or an indicator; mirrored right to left |
| Home, End | Go to the first or last stop |
| Tab, Shift+Tab | Move between the track, the buttons and the indicators |
| Enter, Space | Activate the focused button or indicator |
Carousel from @pelatform/react renders this carousel with the runtime’s controls, keyboard, indicators and autoplay: it keeps its own stop, or the application sets it with index, and each part is a component of its own.
| Prop | Values | Default |
|---|---|---|
index |
The stop shown, from 0, which the application changes in onIndexChange; the carousel scrolls to it, and back to it when the application keeps it |
Its own state |
defaultIndex |
The stop shown first, when the application does not set index |
0 |
onIndexChange |
(index, reason), called once scrolling settles on another stop; reason is previous, next, indicator, keyboard, autoplay or scroll |
None |
perView |
Slides per view, such as 3 or 1.; it sets --plf-carousel-per-view |
1 |
autoplay |
The interval in milliseconds, at least 1000, with a CarouselPlay |
None |
| Part | Element |
|---|---|
CarouselViewport |
A div with carousel-viewport |
CarouselTrack |
A div with carousel-track and tabindex="0", whose children are the slides; slideLabel, (slide, count) => name, names them, {slide} of {count} by default |
CarouselItem |
A div with carousel-item, a slide |
CarouselPrevious, CarouselNext |
A button with carousel-control, type="button", named Previous slide or Next slide unless given an aria-label |
CarouselPlay |
A button with carousel-control-play, type="button", around two icons: the first shows while the slides rotate, the second while they are paused; pauseLabel and playLabel replace its names |
CarouselFooter |
A div with carousel-footer |
CarouselIndicators |
A div with carousel-indicators that renders one indicator per stop, named Choose slide unless given an aria-label; indicatorLabel, (slide, count) => name, names each indicator, Go to slide {slide} by default |
The other props are the element’s own, className and ref included; your image takes carousel-media.
Override on a root or on a single carousel.
| Variable | Default |
|---|---|
--plf-carousel-per-view |
1 |
--plf-carousel-slide-min-size |
0px |
--plf-carousel-gap |
Space 4 (16px) |
--plf-carousel-radius |
Extra large radius (12px) |
--plf-carousel-media-ratio |
16 / 9 |