Перейти до вмісту

Компоненти

Поле введення пароля

Поле пароля з перемикачем його відображення.

Використання

Основне

HTML
<bs:bsui-password-input placeholder="Your password" />

Задати й підтвердити

Звична пара полів, кожне зі своїм підписом та ім’ям у формі.

HTML
<bs:bsui-stack direction="column" gap="4" align="stretch">
  <bs:bsui-field>
    <bs:bsui-field-label text="New password" />
    <bs:bsui-password-input name="password" placeholder="At least 12 characters" />
  </bs:bsui-field>
  <bs:bsui-field>
    <bs:bsui-field-label text="Confirm password" />
    <bs:bsui-password-input name="password_confirm" placeholder="Repeat it" />
  </bs:bsui-field>
</bs:bsui-stack>

Недійсне значення

Для недійсного поля змінюється колір елемента керування та з’являється повідомлення про помилку.

Use at least 12 characters and one number.
HTML
<bs:bsui-field invalid="true">
  <bs:bsui-field-label text="Password" />
  <bs:bsui-password-input placeholder="Enter password" />
  <bs:bsui-field-error text="Use at least 12 characters and one number." />
</bs:bsui-field>

Вимкнено

Кнопка показу заблокована разом із полем.

HTML
<bs:bsui-password-input placeholder="Managed by your identity provider" disabled="true" />

Атрибути

АтрибутТипЗа замовчуванням
name text —
placeholder text Enter password
disabled toggle false
nameAlt text —
onChange text —
value text —
inputId text —
ariaLabel text —
autocomplete text —