Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0b06b21
fix: remplace div by p for helper-text and text-input-error for acces…
nilloq Nov 6, 2025
3a16d20
fix: leading icon position in outlined variant
nilloq Nov 6, 2025
3be7ef5
fix: remove useless form-label class in documentation
nilloq Nov 6, 2025
789fb21
fix: trailing action error gap
nilloq Nov 6, 2025
006fef1
fix: helper link to link-sm
nilloq Nov 7, 2025
80860c1
docs: update migration guides
nilloq Nov 7, 2025
2a60afe
fix: remove data-prefix font icon
nilloq Nov 7, 2025
c8618f2
fix: update examples
nilloq Nov 7, 2025
61e3478
fix: latest review
nilloq Nov 10, 2025
d64e721
fix: duplicate class
nilloq Nov 10, 2025
c63ff1a
feat: text area component WIP
nilloq Nov 10, 2025
06f962f
Merge branch 'ouds/main' into ouds/main-sco-text-area-component
nilloq Nov 17, 2025
fc503b3
feat: text area component complement
nilloq Nov 18, 2025
5458f20
docs: add text area migration guides
nilloq Nov 18, 2025
e9522a8
docs: update migration guide
nilloq Nov 18, 2025
51f1c7a
Merge branch 'ouds/main' into ouds/main-sco-text-area-component
MaxLardenois Nov 19, 2025
f458988
fix: following review
nilloq Nov 21, 2025
3d4d729
fix: some sizes issues
nilloq Nov 21, 2025
2002823
feat: password input component
nilloq Nov 17, 2025
9db4e8a
fix! remplace empy placehold by a placeholder with a single space
nilloq Nov 24, 2025
5e7d25f
Merge branch 'ouds/main' into ouds/main-sco-text-area-component
nilloq Dec 1, 2025
36fcdeb
feat: update textarea resize and default height
nilloq Dec 1, 2025
7cb0f05
docs: update for placeholder space instead of empty
nilloq Dec 1, 2025
96bbc47
feat: prevent label from moving on readonly empty text input
nilloq Dec 1, 2025
0c9211c
fix: regression
nilloq Dec 2, 2025
ba6cde4
Merge branch 'ouds/main' into ouds/main-sco-text-area-component
vprothais Dec 5, 2025
ccdc8fa
fix: following review
nilloq Dec 8, 2025
e3a1285
fix: padding bottom
nilloq Dec 8, 2025
f5d3533
Merge branch 'ouds/main-sco-text-area-component' into ouds/main-sco-p…
nilloq Dec 8, 2025
181d940
Merge branch 'ouds/main' into ouds/main-sco-password-input
MaxLardenois Dec 11, 2025
dc365f9
chore: update migration after 1.0.0
MaxLardenois Dec 11, 2025
ba0a773
Merge branch 'ouds/main' into ouds/main-sco-password-input
nilloq Dec 15, 2025
b3e44aa
fix: merge issue
nilloq Dec 15, 2025
d61e817
fix: merge issue again
nilloq Dec 15, 2025
5eb019f
fix: doc issue
nilloq Dec 15, 2025
d7fb76c
fix: aria issues
nilloq Dec 15, 2025
27bbf59
Merge branch 'ouds/main' into ouds/main-sco-password-input
nilloq Dec 15, 2025
9d0dbf1
fix: merge issue
nilloq Dec 15, 2025
7b07e59
fix: error-text accessibility
nilloq Dec 15, 2025
0e2d920
docs: update migration guide
nilloq Dec 15, 2025
102f1e8
docs: update migration guide
nilloq Dec 15, 2025
b6a4539
fix: add missing icon in sosh brand
nilloq Dec 15, 2025
104ab93
fix: following review
nilloq Dec 16, 2025
6836851
Merge branch 'ouds/main' into ouds/main-sco-password-input
nilloq Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions site/data/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
pages:
- title: Overview
- title: Text input
- title: Password input
- title: Text area
- title: Select
draft: true
Expand Down
144 changes: 144 additions & 0 deletions site/src/content/docs/forms/password-input.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
---
title: Password input
description: A password input is a form field specifically designed to securely capture a user’s confidential password.
aliases:
- "/docs/forms/password-input/"
toc: true
---

import { getVersionedDocsPath } from '@libs/path'

<Callout type="info">
{/* TODO: set the right url for design documentation */}
You can find here the [OUDS password input design guidelines](https://r.orange.fr/r/S-ouds-doc-password-input).
</Callout>

## Overview

The password input masks the characters as they are typed, typically replacing them with dots, in order to protect the input from being read by others nearby.
While the primary goal is to enhance privacy and security, the field may also include usability features such as a "show/hide password" toggle and helper text to guide password creation.

A password input is a specific configuration of the [text input]([[docsref:/forms/text-input]]). It uses a `.text-input` wrapper to create a textual form field with OUDS styles, then wraps a pair of `<input class="text-input-field">` and `<label>` elements in `.text-input-container`. Note that the `<label>` must come before the `<input>`.

A `placeholder` attribute is required on each `<input>` as our CSS-only floating label implementation relies on the `:placeholder-shown` pseudo-element to detect when the input is empty.

<Callout type="info">
Even if you don't need a placeholder, <em>you must always define the placeholder attribute with a single space character</em>. This ensures the label behaves correctly by preventing it from overlapping the input text when a value is entered.
</Callout>

<Callout type="info">
All other available features of the text input component can be used with the password input, such as leading icons, helper text, and validation states. Please refer to the [text input documentation]([[docsref:/forms/text-input]]) for more details.
</Callout>

<Example code={`<div class="text-input mb-medium">
<div class="text-input-container">
<label for="inputPassword">Password</label>
<input type="password" id="inputPassword" class="text-input-field" placeholder=" ">
<button class="btn btn-minimal btn-icon">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#accessibility-vision')}"/>
</svg>
<span class="visually-hidden">Show password</span>
</button>
</div>
</div>
<div class="text-input mb-medium">
<div class="text-input-container">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#lock-closed')}"/>
</svg>
<label for="inputPasswordIcon">Password</label>
<input type="password" id="inputPasswordIcon" class="text-input-field" placeholder="Minimum 8 characters">
<button class="btn btn-minimal btn-icon">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#accessibility-vision')}"/>
</svg>
<span class="visually-hidden">Show password</span>
</button>
</div>
</div>
<div class="text-input mb-medium">
<div class="text-input-container">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#lock-closed')}"/>
</svg>
<label for="inputPasswordPrefix">Password</label>
<div class="input-container" data-bs-prefix="DEV-">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tell in Text Input page that the Prefix should be mentioned in helper text for accessibility reasons. We should do so here, and in all prefix examples, to stick to that point :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Done!

<input type="password" id="inputPasswordPrefix" aria-describedby="inputPasswordPrefixHelper" class="text-input-field" placeholder=" ">
</div>
<button class="btn btn-minimal btn-icon">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#accessibility-vision')}"/>
</svg>
<span class="visually-hidden">Show password</span>
</button>
</div>
<p id="inputPasswordPrefixHelper" class="helper-text">Enter a password with at least 8 characters (without the DEV- prefix).</p>
</div>
<div class="text-input mb-medium">
<div class="text-input-container text-input-container-outlined">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#lock-closed')}"/>
</svg>
<label for="inputPasswordOutlined">Password</label>
<input type="password" id="inputPasswordOutlined" aria-describedby="inputPasswordOutlinedHelper" class="text-input-field" placeholder=" ">
<button class="btn btn-minimal btn-icon">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#accessibility-vision')}"/>
</svg>
<span class="visually-hidden">Show password</span>
</button>
</div>
<p id="inputPasswordOutlinedHelper" class="helper-text">Enter a password with at least 8 characters</p>
</div>
<div class="text-input mb-medium">
<div class="text-input-container text-input-container-outlined">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#lock-closed')}"/>
</svg>
<label for="inputPasswordOutlinedValue">Password</label>
<input type="password" id="inputPasswordOutlinedValue" aria-describedby="inputPasswordOutlinedValueHelper" class="text-input-field" placeholder=" " value="My$ecureP@ssw0rd">
<button class="btn btn-minimal btn-icon">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#accessibility-vision')}"/>
</svg>
<span class="visually-hidden">Show password</span>
</button>
</div>
<p id="inputPasswordOutlinedValueHelper" class="helper-text">Enter a password with at least 8 characters</p>
</div>
<div class="text-input mb-medium">
<div class="text-input-container">
<label for="inputPasswordInvalid">Password</label>
<div class="input-container" data-bs-prefix="DEV-">
<input type="password" id="inputPasswordInvalid" class="text-input-field is-invalid" aria-describedby="inputPasswordInvalidError" placeholder=" " value="12345">
</div>
<button class="btn btn-minimal btn-icon">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#accessibility-vision')}"/>
</svg>
<span class="visually-hidden">Show password</span>
</button>
</div>
<p id="inputPasswordInvalidHelper" class="helper-text">Enter a password with at least 8 characters (without the DEV- prefix).</p>
<p id="inputPasswordInvalidError" class="error-text">Password must be at least 8 characters (without the DEV- prefix).</p>
</div>
<div class="text-input">
<div class="text-input-container text-input-container-outlined">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#lock-closed')}"/>
</svg>
<label for="inputPasswordOutlinedInvalid">Password</label>
<div class="input-container" data-bs-prefix="DEV-">
<input type="password" id="inputPasswordOutlinedInvalid" class="text-input-field is-invalid" aria-describedby="inputPasswordOutlinedInvalidError" placeholder=" " value="12345">
</div>
<button class="btn btn-minimal btn-icon">
<svg aria-hidden="true">
<use xlink:href="${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#accessibility-vision')}"/>
</svg>
<span class="visually-hidden">Show password</span>
</button>
</div>
<p id="inputPasswordOutlinedInvalidHelper" class="helper-text">Enter a password with at least 8 characters (without the DEV- prefix).</p>
<p id="inputPasswordOutlinedInvalidError" class="error-text">Password must be at least 8 characters (without the DEV- prefix).</p>
</div>`} />
4 changes: 4 additions & 0 deletions site/src/content/docs/migrations/migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ toc: true

- <span class="tag tag-small rounded-none tag-positive">New</span> `.control-items-list` and `.control-item-error-message` has been added.

#### Password Input

- <span class="tag tag-small rounded-none tag-positive">New</span> Password input has been implemented. Read more in our [password input page]([[docsref:/forms/password-input]]).

#### Radio buttons

- <span class="tag tag-small rounded-none tag-warning">Warning</span> Radio button component has been updated to 1.4.0. Read more in our [radio button page]([[docsref:/forms/radio-button]]).
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading