Nuxt/test/fixtures/basic/components/ComponentWithIds.vue
Якин Никита 658a0ffed7
feat(nuxt): useId composable (#23368)
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Sébastien Chopin <seb@nuxt.com>
2024-01-30 09:10:13 +00:00

22 lines
362 B
Vue

<script setup>
const emailId = useId()
const passwordId = useId()
</script>
<template>
<div>
<label :for="emailId">Email</label>
<input
:id="emailId"
name="email"
type="email"
>
<label :for="passwordId">Password</label>
<input
:id="passwordId"
name="password"
type="password"
>
</div>
</template>