Porsche Design SystemSearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
Border Table of Contents Example

Border Radius

Small
Medium
Large

Border Width

import { ChangeDetectionStrategy, Component } from '@angular/core';

@Component({
  selector: 'porsche-design-system-app',
  styles: [
    `
      @use '@porsche-design-system/components-angular/styles' as *;

      // Wrapper
      .wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: $pds-grid-gap;
        padding: $pds-spacing-fluid-medium;
      }

      // Typography
      .heading {
        @include pds-heading-medium;
        color: $pds-theme-light-primary;
        text-align: center;
        width: 100%;
        margin: 0;
      }

      // Tile
      .tile {
        @include pds-text-small;
        color: $pds-theme-dark-primary;
        background: $pds-theme-dark-background-base;
        padding: $pds-spacing-fluid-medium;
      }

      // Border Radius
      .border-radius-small {
        border-radius: $pds-border-radius-small;
      }

      .border-radius-medium {
        border-radius: $pds-border-radius-medium;
      }

      .border-radius-large {
        border-radius: $pds-border-radius-large;
      }

      // Border Width
      .border-width-base {
        width: 100%;
        border-bottom: $pds-border-width-base solid $pds-theme-light-primary;
        &::before {
          @include pds-text-x-small;
          content: 'Base';
          color: $pds-theme-light-primary;
        }
      }

      .border-width-thin {
        width: 100%;
        border-bottom: $pds-border-width-thin solid $pds-theme-light-primary;
        &::before {
          @include pds-text-x-small;
          content: 'Thin';
          color: $pds-theme-light-primary;
        }
      }
    `,
  ],
  template: `
    <div class="wrapper">
      <h3 class="heading">Border Radius</h3>
      <div class="border-radius-small tile">Small</div>
      <div class="border-radius-medium tile">Medium</div>
      <div class="border-radius-large tile">Large</div>
    </div>
    <div class="wrapper">
      <h3 class="heading">Border Width</h3>
      <div class="border-width-base"></div>
      <div class="border-width-thin"></div>
    </div>
  `,
  changeDetection: ChangeDetectionStrategy.OnPush,
  standalone: false,
})
export class ExampleComponent {}
Usage Border-Radius Do: Use the large border-radius for parent elements such as images and containers. Adapt nested elements within a parent element with a medium border-radius for better visual appearance. Use the small border-radius for all interactive elements (e.g. Buttons). Icons should be designed with a 2px border-radius when feasible. Don't: Don't use other border-radius than the defined tokens. Don't use a border-radius when an element touches the side of a parent element or the browser. Border-Width Standardized stroke-widths are used for all components for a consistent appearance. Don't Use borders to create a minimalistic interface. Use other than the defined stroke widths. Styles The styles are available as JavaScript and SCSS version. Look at the example above to see how the styles work. JS When using JSS, styled-components etc. JavaScript styles can be imported by: import { … } from '@porsche-design-system/components-{js|angular|react|vue}/styles';. When using vanilla-extract JavaScript styles can be imported by: import { … } from '@porsche-design-system/components-{js|angular|react|vue}/styles/vanilla-extract';. border borderRadius borderRadiusLarge borderRadiusMedium borderRadiusSmall borderWidth borderWidthBase borderWidthThin SCSS SCSS styles can be imported by @use '@porsche-design-system/components-{js|angular|react|vue}/styles' as *; $pds-border-radius-large $pds-border-radius-small $pds-border-radius-medium $pds-border-width-base $pds-border-width-thin
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%