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)DirectionThe 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%