Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Password Field
Use PasswordField for a password the user types and may reveal to check. It renders
the Input Group surface, so the shared border, background, focus, invalid, and disabled visuals
are the same as every other grouped input.
Anatomy
<Field name="password">
<FieldLabel>Password</FieldLabel>
<PasswordField>
<PasswordFieldInput autoComplete="current-password" required />
<PasswordFieldToggle aria-label="Show password" />
</PasswordField>
</Field>
The anatomy mirrors the Base UI Password Field preview. Dify UI owns the appearance and this public API: the surface, the input styles, the toggle's size and glyph. The reveal behavior is a minimal local implementation until Base UI ships the primitive; the parts then become styled wrappers around it without changing call sites.
Contract
PasswordFieldInputownstype.autoCompleteis required:current-passwordfor an existing password,new-passwordfor a password being set.PasswordFieldToggleis optional. Itsaria-labelstays constant;aria-pressedreports whether the value is revealed. Pressing it with a pointer keeps focus in the input. It stays available while the input is read-only.disabledonPasswordFieldapplies to the input and the toggle; a disabledFieldreaches only the input. Wrap the field inFieldfor the label, validation, and errors.- Other masked values, such as tokens, use
Inputwithtype="password"andautoComplete="off".new-passwordwould make browsers suggest a generated password for them.