{% load i18n %}

<div class="max-w-2xl relative w-full" x-data="{ showPassword: false }">
    <input type="{{ widget.type }}" x-bind:type="showPassword ? 'text' : 'password'" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}>
    <span class="material-symbols-outlined absolute cursor-pointer select-none right-3 top-0 bottom-0 flex items-center justify-center text-icon" x-on:click="showPassword = !showPassword" x-text="showPassword ? 'visibility_off' : 'visibility'" title="{% trans "Toggle password visibility" %}"></span>
</div>
