Skip to content

feat(auth): add show/hide password toggle to auth forms #209

Closed

Description

@gkhngyk

What

Add a show/hide ("eye") toggle to password inputs in the auth forms, so users can reveal what they typed. Clicking the eye icon switches the field between masked (type="password") and visible (type="text").

Where

All password fields currently use <Input type="password"> from @/components/ui/input. The toggle should be added to:

Suggested approach

Rather than duplicate the toggle in four places, add a small reusable component (e.g. web/src/components/ui/password-input.tsx) that wraps <Input> with a trailing eye button, then swap the four type="password" fields to use it. The Eye / EyeOff icons from lucide-react are already used elsewhere in the app, so no new dependency.

Sketch:

const [visible, setVisible] = useState(false);
// ...
<div className="relative">
  <Input type={visible ? 'text' : 'password'} {...props} className="pr-10" />
  <button
    type="button"                      // important: don't submit the form
    onClick={() => setVisible((v) => !v)}
    aria-label={visible ? 'Hide password' : 'Show password'}
    className="absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground"
  >
    {visible ? <EyeOff className="h-4 w-4" /> : <Eye className="h-4 w-4" />}
  </button>
</div>

Acceptance

  • The registration password field has a working eye toggle (masked ↔ visible)
  • Same toggle on sign-in, reset-password, and accept-invitation password fields
  • The toggle button is type="button" (does not submit the form) and has an aria-label
  • Default state is masked; existing form behavior/validation is unchanged

Notes

  • UI-only change.

Activity

  1. added
    enhancement
    good first issue
    on Jun 9, 2026
  2. added a commit that references this issue on Jun 9, 2026
    ffc7932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions