Skip to contentPorsche Design System
You are currently viewing an earlier release of the Porsche Design System.Switch to the latest Porsche Design System documentation.
SearchGitHub repository of Porsche Design SystemOpen settings sidebar
Carousel Table of ContentsPropertiestype BreakpointCustomizable<T> = { base: T; xs?: T; s?: T; m?: T; l?: T; xl?: T; xxl?: T; };PropertyAttributeDescriptionTypeDefaultactiveSlideIndex active-slide-indexSets the zero-based index of the currently visible slide. Update this to navigate programmatically.number0alignControls align-controlsControls the alignment of custom slotted controls within the header area.type CarouselAlignControls =
'start'
'center'
'auto'
'auto'
alignHeader align-headerControls the horizontal alignment of the heading and description.type CarouselAlignHeader =
'start'
'center'
'start'
aria ariaSets ARIA attributes on the carousel region element for improved accessibility.type CarouselAriaAttribute = {
  'aria-label'?: string;
}
undefined
description descriptionSets the description text displayed below the heading for additional context.stringundefinedfocusOnCenterSlide focus-on-center-slideWhen enabled, each slide is individually focusable and the carousel navigates one slide at a time instead of one page.booleanfalsegradient gradientShows a gradient fade at the start and end edges to visually indicate more slides beyond the viewport.booleanfalseheading headingSets the heading text displayed above the carousel. Also used as the accessible label when no aria prop is set.stringundefinedheadingSize heading-sizeSets the font size of the carousel heading.type CarouselHeadingSize =
'x-large'
'xx-large'
'x-large'
intl intlOverrides the default label strings used for the previous, next, and page indicators — useful for localization.type CarouselInternationalization = {
  'prev'?: string;
  'next'?: string;
  'first'?: string;
  'last'?: string;
  'slideLabel'?: string;
  'slide'?: string;
}
undefined
pagination 🛠paginationShows pagination dot indicators below the carousel. Supports responsive breakpoint values.boolean
BreakpointCustomizable<boolean>
false
rewind rewindEnables infinite looping — navigating past the last slide wraps back to the first, and vice versa.booleanfalseskipLinkTarget skip-link-targetSets the href of an in-page skip link that lets keyboard users jump past the carousel slides.stringundefinedslidesPerPage 🛠slides-per-pageSets how many slides are visible at once. Use auto to control each slide's width via CSS. Supports responsive breakpoint values.type CarouselSlidesPerPage =
'auto'
1
2
3
4
5
6
7
8
9
10
BreakpointCustomizable<CarouselSlidesPerPage>
1
trimSpace trim-spaceRemoves whitespace before the first and after the last slide when focusOnCenterSlide is enabled.booleanfalsewidth widthSets the maximum width and outer spacing of the carousel, aligned to PDS grid widths.type CarouselWidth =
'basic'
'extended'
'wide'
'full'
'basic'
EventsEventDescriptionTypeupdate Emitted when the carousel navigates to a new slide, with the active and previous slide indexes in the event detail.type CarouselUpdateEventDetail = {
  activeIndex: number;
  previousIndex: number;
}
CustomEvent<CarouselUpdateEventDetail>
SlotsSlotDescriptionisRequiredaltPropallowedTagNames<slot name="heading"> Renders a heading above the carousel.<slot name="description"> Renders descriptive content below the heading.<slot name="controls"> Renders custom controls such as navigation buttons or indicators.<slot> Default slot for the carousel slides.CSS VariablesCSS VariableDescriptiondefaultValue--p-carousel-px Defines the logical inline start and end padding of the carousel, the extra space is used to show parts of the next/previous slide. When used then the prop `width` has no effect anymore.--p-carousel-ps Defines the logical inline start padding of the carousel, the extra space is used to show parts of the next/previous slide. Needs to be used in combination with `--p-carousel-px` or `--p-carousel-pe`. When used then the prop `width` has no effect anymore.--p-carousel-pe Defines the logical inline end padding of the carousel, the extra space is used to show parts of the next/previous slide. Needs to be used in combination with `--p-carousel-px` or `--p-carousel-ps`. When used then the prop `width` has no effect anymore.--p-carousel-prev-next-color-scheme Color Scheme applied to the navigation (prev/next buttons)--p-carousel-border-radius Sets the border radius of each carousel slide.var(--p-radius-large, var(--p-radius-4xl))
Global settingsColor SchemeAll color tokens use the light-dark() CSS function. Set the theme via the CSS color-scheme property: light for light mode, dark for dark mode, or light dark to follow the user's system preference.LightDarkLight DarkDirectionThe dir global attribute in HTML changes the direction of text and other content within an element. It's most often used on the <html> tag to set the entire page's direction, which is crucial for supporting languages that are written from right to left (RTL), such as Arabic and Hebrew. For example, using <html dir="rtl"> makes the entire page display from right to left, adjusting the layout and text flow accordingly.LTR (left-to-right)RTL (right-to-left)Text ZoomTo ensure accessibility and comply with WCAG 2.2 AA standards, it is mandatory for web content to support text resizing up to at least 200% without loss of content or functionality. Using relative units like rem is a best practice for achieving this, as they allow the text to scale uniformly based on the user's browser settings.100%130%150%200%