Porsche Design SystemSearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
ConfiguratorExamplesUsageAccessibilityAPI
Flyout Table of Contents Sticky content with Custom CSS Property (Experimental) In order to display some sticky element within the flyout content you can use the experimental --p-flyout-sticky-top CSS custom property to account for the height of the header.
Open FlyoutSome Heading
Some sticky element within content relying on --p-flyout-sticky-top
Some Content Begin
Some Content End
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<p-button type="button" aria="{'aria-haspopup': 'dialog'}">
  Open Flyout
</p-button>

<p-flyout aria="{'aria-label': 'Some Heading'}">
  <p-heading slot="header" size="large" tag="h2">
    Some Heading
  </p-heading>
  <div class="grid grid-cols-[2fr_1fr] gap-static-md items-start">
    <div class="sticky top-[calc(var(--p-flyout-sticky-top,0)+16px)] p-static-md bg-surface">
      Some sticky element within content relying on --p-flyout-sticky-top
    </div>
    <div>
      <p-text>
        Some Content Begin
      </p-text>
      <div class="w-[10px] h-[120vh] bg-[deeppink]"></div>
      <p-text>
        Some Content End
      </p-text>
    </div>
  </div>
</p-flyout>
<script>
  const pButton = document.querySelector("p-button");
  const pFlyout = document.querySelector("p-flyout");
  pButton.addEventListener('click', () => (pFlyout.open = true));
  pFlyout.addEventListener('dismiss', () => (pFlyout.open = false));
</script>
</body>
</html>
Flyout Form The following example demonstrates how a form can be used within a flyout component:
Open FlyoutSome Heading
SubmitResetLast submitted data:

checkbox: none
textarea: none
Open in Stackblitz
<!doctype html>
<html lang="en" class="auto">
<head>
  <title></title>
</head>
<body class="bg-base">

<p-button type="button" aria="{ 'aria-haspopup': 'dialog' }">Open Flyout</p-button>

<p-flyout open="false" aria="{ 'aria-label': 'Some Heading' }">
  <p-heading slot="header" size="large" tag="h2">Some Heading</p-heading>
  <form id="some-form">
    <p-checkbox name="some-checkbox" label="Some Label"></p-checkbox>
    <p-textarea name="some-textarea" label="Some Label"></p-textarea>
  </form>
  <p-button-group slot="footer">
    <p-button type="submit" form="some-form">Submit</p-button>
    <p-button type="reset" variant="secondary" form="some-form">Reset</p-button>
  </p-button-group>
  <p-text slot="sub-footer">
    Last submitted data:
    <br/><br/>
    checkbox: <span>none</span>
    <br/>
    textarea: <span>none</span>
  </p-text>
</p-flyout>
<script>
  const flyout = document.querySelector('p-flyout');
  flyout.addEventListener('dismiss', () => (flyout.open = false));
  document.querySelector('p-button').addEventListener('click', () => (flyout.open = true));

  const debugElement = document.querySelectorAll('span');
  const checkboxValue = debugElement[0];
  const textareaValue = debugElement[1];
  const form = document.querySelector('form');
  form.addEventListener('submit', (e) => {
    e.preventDefault();
    const formData = new FormData(form);
    checkboxValue.innerHTML = formData.get('some-checkbox')?.toString() || 'none';
    textareaValue.innerHTML = formData.get('some-textarea')?.toString() || 'none';
  });
</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%