Skip to content
Eskais UI

Forms

Password Input

UI SDK PasswordInput styled as a field: a reveal toggle as an icon button with a tooltip that keeps its name while aria-pressed says whether the password shows, floating labels and FormField binding.

Example

At least 12 characters.

Installation

npx shadcn@latest add @eskais/password-input
Brings alongfieldinputtooltip
npm packageslucide-react

Usage

Import
import {  createPasswordInputController,  PasswordInput,  PasswordInputControl,  PasswordInputToggle,} from "@/components/ui/password-input"

API reference

PasswordInputToggle

PropTypeDefault
tooltipControlTooltipOption–

Also takes every prop of UI SDK PasswordInputToggle.

Other exports

createPasswordInputControllertype PasswordInputControllertype PasswordInputStatetype PasswordInputVisibleChangeReason

Accessibility

  • A native password field named by its Field label, so password managers and autofill work.
  • The toggle is a toggle button named "Show password" whose aria-pressed says whether the password shows; its name never flips.
  • A pointer press on the toggle keeps the caret in the field; submitting or leaving the page hides the password again.

Agent actions

Agents find it by its label, set the value and show or hide it with toggleVisible.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.