You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For what version of Nuxt UI are you suggesting this?
v3.0.0-alpha.x
Description
I find that creating an input password with toggle button to show the text felt so verbose. How about adding a default toggle button when the input has password type since it was a good practice for accessibility?
Additional context
<!-- this is easier and shorter to write --><UInputtype="password" />
<!-- if we want to hide, we can let slot do the work, or maybe consider adding a properties to hide it. It's more shorter --><UInputtype="password"><template#trailing></template></UInput><!-- compared to what we must do now as the documentation say --><template><UInputv-model="password"
placeholder="Password"
:type="show ? 'text' : 'password'"
:ui="{ trailing: 'pe-1' }"
><template#trailing><UButtoncolor="neutral"
variant="link"
size="sm"
:icon="show ? 'i-lucide-eye-off' : 'i-lucide-eye'"
aria-label="show ? 'Hide password' : 'Show password'"
:aria-pressed="show"
aria-controls="password"
@click="show = !show"
/>
</template></UInput></template><scriptsetuplang="ts">constshow=ref(false)constpassword=ref('password')</script>
The text was updated successfully, but these errors were encountered:
Personally I think how it is in the docs is the right way. It is very explicit and fully flexible. What you want may work for your use case but then Nuxt UI needs to provide every use case possible. Yes Nuxt UI is a framework but less abstraction also gives more freedom for the dev.
For what version of Nuxt UI are you suggesting this?
v3.0.0-alpha.x
Description
I find that creating an input password with toggle button to show the text felt so verbose. How about adding a default toggle button when the input has password type since it was a good practice for accessibility?
Additional context
The text was updated successfully, but these errors were encountered: