<script setup lang="ts">
let isReady = $ref(false)
const containerRef = $ref<HTMLElement>()
let rect = $ref<DOMRect>()
onMounted(() => {
  if (containerRef) {
    rect = containerRef.getBoundingClientRect()
    isReady = true
  }
})
</script>

<template>
  <div ref="containerRef" class="overflow-hidden">
    <slot v-if="isReady" :="{ ...rect }" />
  </div>
</template>
