Unlock faster development with Fidely UI Pro components Coming soon

Password Input

Used to allow users enter secure text such as passwords and API keys.

Usage

import { PasswordInput } from '@fidely-ui/react'
<PasswordInput.Root>
  <PasswordInput.Label />
  <PasswordInput.Control>
    <PasswordInput.Input />
    <PasswordInput.VisibilityTrigger>
      <PasswordInput.Indicator />
    </PasswordInput.VisibilityTrigger>
  </PasswordInput.Control>
</PasswordInput.Root>

Examples

Pass the size prop to the Password.Root change the size of the password input.

Autocomplete

Use the autoComplete prop to manage browser autocompletion.

new-password — The user is creating a new password.

current-password — The user is entering an existing password.

Custom Icon and Fallback

Wrap PasswordInput.Indicator with your custom icon and provide a fallback for when the icon cannot be rendered.

Field

Combine PasswordInput with Field component for full field layouts.

Enter your passwordPassword must be greater than 3 chars.

Invalid

Pass the invalid prop to the PasswordInput.Root.

asChild

Use the asChild prop to render or use the child elemets component.

If you are using the Fidely Input component as a child, it will apply extra styling pass the unstyled prop to the input component to remove default styles.

Ignoring password managers

Use the ignorePasswordManager prop to ignore password managers like 1Password, LastPass, etc. This is useful for non-login scenarios such as API keys, secure notes, or temporary passwords.

Currently, this only works for 1Password, LastPass, Bitwarden, Dashlane, and Proton Pass.

Controlled visibility

Use the visible and onVisibilityChange props to control the visibility of the password input.

Props

Root

PropTypeDefaultDescription
asChildboolean—Uses the provided child element as the rendered element, merging its props and behavior.
autoComplete'current-password' | 'new-password''current-password'Controls the browser’s autocomplete behavior for the password field.
defaultVisibleboolean—The initial visibility state of the password input.
disabledboolean—Whether the password input is disabled.
ignorePasswordManagersboolean—When true, the input will attempt to block autofill from password managers.
Supported managers: 1Password, LastPass, Bitwarden, Dashlane, Proton Pass.
invalidboolean—Marks the input as invalid.
namestring—The name attribute for the input element.
onVisibilityChange(details: VisibilityChangeDetails) => void—Callback fired when the visibility state changes.
readOnlyboolean—Whether the input is read-only.
requiredboolean—Whether the input is required.
visibleboolean—Controls the visibility state when using a controlled visibility pattern.

Control

PropTypeDefaultDescription
asChildboolean—Uses the provided child element as the rendered element, merging behavior.

Input

PropTypeDefaultDescription
asChildboolean—Uses the provided child element as the rendered element, merging behavior.

On this page