Skip to content

add password mode to hide/reveal text in NTextInput#2339

Open
gokomer wants to merge 1 commit intonoctalia-dev:mainfrom
gokomer:NTextInput-password-mode
Open

add password mode to hide/reveal text in NTextInput#2339
gokomer wants to merge 1 commit intonoctalia-dev:mainfrom
gokomer:NTextInput-password-mode

Conversation

@gokomer
Copy link
Copy Markdown

@gokomer gokomer commented Mar 28, 2026

Pull Request

Motivation

I couldn't find a way to mask password/api keys so this adds a password mode to the NTextInput widget, allowing it to mask input characters. Includes an optional toggle button to show/hide the password. I find it useful for plugins require password or api keys.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring

Testing

Describe how you tested your changes and mark the relevant items.

  • Tested on niri
  • Tested on Hyprland
  • Tested on sway
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors (if applicable)

Screenshots / Videos

hide-password show-password

Checklist

  • Code follows project style guidelines
  • Self-reviewed my code
  • No new warnings or errors
  • Documentation or comments updated (if relevant)

Additional Notes

Three new properties are exposed on NTextInput:

  • passwordMode -> enables masked input
  • passwordVisible -> tracks current visibility state
  • showPasswordToggle -> shows/hides the eye icon button

Translation keys common.show-password and common.hide-password were added to en.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant