Add a ::show-peek-icon property and show a clickable icon when it is set. Clicking it toggles the visibility of the content. The same functionality is also accessible via a context menu item. This is a common feature of password entries.