Built-in Special Attributes ref

Denotes a template ref

ref is used to register a reference to an
element or a child component.

<!-- stored as this.$refs.p -->
<p ref="p">hello</p>

<script setup>
import { ref } from 'vue'

const p = ref()
</script>

<template>
  <p ref="p">hello</p>
</template>

<ChildComponent :ref="(el) => child = el" />