diff --git a/front/src/components/ui/Input.vue b/front/src/components/ui/Input.vue index ba3e7fb11..f8b07af2c 100644 --- a/front/src/components/ui/Input.vue +++ b/front/src/components/ui/Input.vue @@ -8,10 +8,11 @@ import Layout from "~/components/ui/Layout.vue" const { icon, placeholder, ...restProps } = defineProps<{ icon?: string, - placeholder?:string, - password?:true, - search?:true, - numeric?:true, + placeholder?: string, + password?: true, + search?: true, + numeric?: true, + label?: string, }>() // TODO(A11y): Add `inputmode="numeric" pattern="[0-9]*"` to input if model type is number: @@ -45,6 +46,10 @@ const model = defineModel() + + {{ restProps.label }} + + +## Label slot + +```vue-html{2-4} + + + +``` + + + + + +If you just have a string, we have a convenience prop, so instead you can write: + +```vue-html + +``` + + + ## Input-right slot You can add a template on the right-hand side of the input to guide the user's input.