Porsche Design System
You are currently viewing an earlier release of the Porsche Design System.Switch to the latest Porsche Design System documentation.
SearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
ConfiguratorExamplesUsageAccessibilityAPI
Carousel Table of ContentsPropertiestype BreakpointCustomizable<T> = { base: T; xs?: T; s?: T; m?: T; l?: T; xl?: T; xxl?: T; };PropertyAttributeDescriptionTypeDefaultactiveSlideIndex active-slide-indexDefines which slide is active (zero-based numbering).number0alignControls align-controlsAligns the slotted controls.type CarouselAlignControls =
'start'
'center'
'auto'
'auto'
alignHeader align-headerAligns the heading and description.type CarouselAlignHeader =
'start'
'center'
'start'
aria ariaSets ARIA attributes.type CarouselAriaAttribute = {
  'aria-label'?: string;
}
undefined
description descriptionDefines the description used in the carousel.stringundefinedfocusOnCenterSlide focus-on-center-slideIndicates whether focus should be set on the center slide. If true, the carousel loops by individual slide; otherwise, it loops by page.booleanfalsegradient gradientFades the slides out.booleanfalseheading headingDefines the heading used in the carousel.stringundefinedheadingSize heading-sizeDefines the heading size used in the carousel.type CarouselHeadingSize =
'x-large'
'xx-large'
'x-large'
intl intlOverride the default wordings that are used for aria-labels on the next/prev buttons and pagination.type CarouselInternationalization = {
  'prev'?: string;
  'next'?: string;
  'first'?: string;
  'last'?: string;
  'slideLabel'?: string;
  'slide'?: string;
}
undefined
pagination 🛠paginationIf false, the carousel will not show pagination bullets at the bottom.boolean
BreakpointCustomizable<boolean>
false
rewind rewindWhether the slides should rewind from last to first slide and vice versa.booleanfalseskipLinkTarget skip-link-targetDefines the skip link target used to skip carousel entries.stringundefinedslidesPerPage 🛠slides-per-pageSets the amount of slides visible at the same time. Can be set to auto if you want to define different widths per slide via CSS.type CarouselSlidesPerPage =
'auto'
1
2
3
4
5
6
7
8
9
10
BreakpointCustomizable<CarouselSlidesPerPage>
1
trimSpace trim-spaceDetermines whether to trim spaces before/after the carousel if focusOnCenterSlide option is true.booleanfalsewidth widthDefines the outer spacings between the carousel and the left and right screen sides.type CarouselWidth =
'basic'
'extended'
'wide'
'full'
'basic'
EventsEventDescriptionTypeupdate Emitted when carousel's content slides.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.
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%