Porsche Design SystemSearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
ConfiguratorUsageAccessibilityAPI
Canvas 🧪 Usage The following segment provides instructions for designers and developers regarding the appropriate utilization of the p-canvas layout component in various application contexts. Do: Use p-canvas to structure complex application layouts with sidebars, headers, and footers in a consistent, responsive manner. Use named slots (sidebar-start, sidebar-end, header-start, footer, etc.) to separate concerns and improve maintainability. Use the -p-canvas-grid utility class to create a 12-column layout inside the canvas content or footer areas. Combine p-canvas with CSS Grid column helpers (e.g. grid-column: span 4) to align content efficiently. Use the sidebarStartOpen and sidebarEndOpen bindings to dynamically control sidebar behavior based on viewport size or user actions. Customize layout widths via CSS variables like --p-canvas-sidebar-start-width and --p-canvas-sidebar-end-width to match your design needs. Use slot="background" for decorative media like images or videos that sit below the main content, enhancing visual appeal. Consider keyboard and focus management when using dynamic flyouts or sidebars, especially on mobile. Don’t: Don’t use p-canvas for simple or static content pages where a standard layout is sufficient. Don’t place critical content only inside sidebars or sticky areas without providing access via the main layout. Don’t rely solely on custom styling; instead, use provided slots and layout classes to maintain consistency. Don’t nest p-canvas within another p-canvas; this may lead to unpredictable layout behavior. Don’t overload the p-canvas with too many sticky elements that compete for screen space, especially on smaller viewports. Don’t use -p-canvas-grid outside of canvas slots—it is experimental and might be removed in future releases. Don’t override CSS variables globally without scoping, as this can break other usages in your application.
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%