Skip to contentPorsche Design System
You are currently viewing an earlier release of the Porsche Design System.Switch to the latest Porsche Design System documentation.
SearchGitHub repository of Porsche Design SystemOpen settings sidebar
Pin Code Table of ContentsPropertiestype BreakpointCustomizable<T> = { base: T; xs?: T; s?: T; m?: T; l?: T; xl?: T; xxl?: T; };PropertyAttributeDescriptionTypeDefaultcompact compactReduces the pin code field height and spacing for use in dense layouts where vertical space is limited.booleanfalsedescription descriptionSets a supplementary description displayed below the label to give users additional guidance about the pin code.string''disabled disabledPrevents user interaction with all pin code fields and blocks events while the component is disabled.booleanfalseform formAssociates the pin code with a form element by its ID when it is not a direct descendant of that form.stringundefinedhideLabel 🛠hide-labelHides the visible label and description while keeping them accessible to screen readers. Supports responsive breakpoint values.boolean
BreakpointCustomizable<boolean>
false
label labelSets the visible label text displayed above the pin code fields to identify their purpose.string''length lengthSets the number of individual input fields rendered, determining how many characters the pin code consists of.type PinCodeLength =
1
2
3
4
5
6
4
loading loadingDisables the pin code fields and shows a loading spinner to indicate an ongoing background operation.booleanfalsemessage messageSets the validation feedback message displayed below the pin code when state is success or error.string''name nameSets the name of the control submitted with the form data to identify the pin code value on the server.stringundefinedrequired requiredMarks the pin code as required so the form cannot be submitted until all fields are filled.booleanfalsestate stateSets the validation state of the pin code, which controls its visual appearance and feedback message style (none, success, error).type PinCodeState =
'none'
'error'
'success'
'none'
type typeControls whether the individual input fields mask their content as password dots (password) or show digits (number).type PinCodeType =
number
'password'
'number'
value valueSets the current concatenated value of all pin code fields and allows setting the initial value.string''
EventsEventDescriptionTypeblur Emitted when the pin code component loses focus after the user finishes entering characters.CustomEvent<void>change Emitted when the pin code value changes as the user types, carrying the new concatenated value in the event detail.type PinCodeChangeEventDetail = {
  value: string;
  isComplete: boolean;
}
CustomEvent<PinCodeChangeEventDetail>
SlotsSlotDescriptionisRequiredaltPropallowedTagNames<slot name="label"> Shows a label. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed.<slot name="label-after"> Places additional content after the label text (for content that should not be part of the label, e.g. external links or `p-popover`).<slot name="description"> Shows a description. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed.<slot name="message"> Shows a state message. Only [phrasing content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) is allowed.
Global settingsColor SchemeAll color tokens use the light-dark() CSS function. Set the theme via the CSS color-scheme property: light for light mode, dark for dark mode, or light dark to follow the user's system preference.LightDarkLight DarkDirectionThe 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%