Similar to how it was discussed here for ShadcnUI, I think the Input component would benefit from a "show password"-button.
I have implemented such a functionality locally in my Nuxt project and am happy with it. I would like to know whether this is something the current implementation of Shadcn-Vue would benefit from in your opinion, or whether, because the original ShadcnUI doesn't seem to have this in its native Input component, this should not be added.
I am ready to make a PR, but wanted to quickly discuss here, before going into implementation details (which definitely need some more looking at; I currently use Nuxt Icon and am unsure how this would make my current implementation adaptable).
This is my current Input component (regular input to compare):
import type { HTMLAttributes } from 'vue'
import { ref } from 'vue'
import { useVModel } from '@vueuse/core'
import { cn } from '@/lib/utils'
const props = defineProps<{
defaultValue?: string | number
modelValue?: string | number
class?: HTMLAttributes['class']
type: string
}>()
const emits = defineEmits<{
(e: 'update:modelValue', payload: string | number): void
}>()
const modelValue = useVModel(props, 'modelValue', emits, {
passive: true,
defaultValue: props.defaultValue,
})
const showPassword = ref(false)
This project's goal is to remain aligned with shadcn/ui. If the feature you are requesting is not in the original shadcn/ui, it will not be considered here.
Describe the feature
Similar to how it was discussed here for ShadcnUI, I think the Input component would benefit from a "show password"-button.
I have implemented such a functionality locally in my Nuxt project and am happy with it. I would like to know whether this is something the current implementation of Shadcn-Vue would benefit from in your opinion, or whether, because the original ShadcnUI doesn't seem to have this in its native Input component, this should not be added.
I am ready to make a PR, but wanted to quickly discuss here, before going into implementation details (which definitely need some more looking at; I currently use Nuxt Icon and am unsure how this would make my current implementation adaptable).
This is my current Input component (regular input to compare):
password
via field configs.Additional information