Porsche Design SystemSearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
ConfiguratorExamplesUsageAccessibilityAPI
Scroller Table of Contents Height The height of p-scroller depends on its content height. Keep in mind that the content passed to the p-scroller should be within the size definition of the design system and thus have a minimum height of 24px to ensure visual alignment of the scroll indicators. The p-scroller only takes care of the horizontal alignment. Spacing and custom css properties must be handled by the consumer e.g. white-space: nowrap to avoid line breaks inside the elements.
Some tag contentSome tag contentSome tag contentSome tag contentSome tag content
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<p-scroller class="max-w-[600px] whitespace-nowrap">
  <p-tag-dismissible class="me-static-md">
    Some tag content
  </p-tag-dismissible>
  <p-tag-dismissible class="me-static-md">
    Some tag content
  </p-tag-dismissible>
  <p-tag-dismissible class="me-static-md">
    Some tag content
  </p-tag-dismissible>
  <p-tag-dismissible class="me-static-md">
    Some tag content
  </p-tag-dismissible>
  <p-tag-dismissible class="me-static-md">
    Some tag content
  </p-tag-dismissible>
</p-scroller>
<script>

</script>
</body>
</html>
Scroll to position The p-scroller component provides the scrollToPosition property. It accepts { scrollPosition: number, isSmooth?: boolean }. If scrollToPosition is set with isSmooth: true the scrolling is animated.
Scroll to startScroll to middleScroll to end
START - some tag contentMIDDLE - some tag contentEND - some tag content
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<p-button type="button" id="start" compact="true">Scroll to start</p-button>
<p-button type="button" id="middle" compact="true">Scroll to middle</p-button>
<p-button type="button" id="end" compact="true">Scroll to end</p-button>

<div style="max-width: 400px; white-space: nowrap">
  <p-scroller scroll-to-position="{scrollPosition: 220}">
    <p-tag-dismissible>START - some tag content</p-tag-dismissible>
    <p-tag-dismissible>MIDDLE - some tag content</p-tag-dismissible>
    <p-tag-dismissible>END - some tag content</p-tag-dismissible>
  </p-scroller>
</div>



<style>
  p-scroller > *:not(:last-child) {
    margin-right: 1rem;
  }

  button {
    margin: 0 1rem 1rem 0;
  }
</style>
<script>
  const scroller = document.querySelector('p-scroller');

  const scrollToStart = document.querySelector('#start');
  scrollToStart.addEventListener('click', () => {
    scroller.scrollToPosition = { scrollPosition: 0, isSmooth: true };
  });

  const scrollToMiddle = document.querySelector('#middle');
  scrollToMiddle.addEventListener('click', () => {
    scroller.scrollToPosition = { scrollPosition: 220, isSmooth: true };
  });

  const scrollToEnd = document.querySelector('#end');
  scrollToEnd.addEventListener('click', () => {
    scroller.scrollToPosition = { scrollPosition: 720, isSmooth: true };
  });
</script>
</body>
</html>
Global settingsThemeChanges the theme of the application and any Porsche Design System component. It's possible to choose between forced theme light and dark. It's also possible to use auto, which applies light or dark theme depending on the operating system settings automatically.LightDarkAuto (sync with operating system)DirectionChanges the direction of HTML elements, mostly used on<html> tag to support languages which are read from right to left like e.g. Arabic.LTR (left-to-right)RTL (right-to-left)AutoText ZoomChanges the text size and values with unit rem or em relatively. This setting can be defined in browser settings for any website or by an application itself on<html> tag. To achieve WCAG 2.2 AA compliance it's obligatory to support text zoom up to at least 200%.100%130%150%200%