Hole Background

A background component featuring an animated tunnel of rings with rising particles.

<script setup lang="ts">
import HoleBackground from '@/components/animate-ui/backgrounds/hole/HoleBackground.vue'
</script>

<template>
  <HoleBackground class="absolute inset-0" />
</template>

Installation

npx shadcn-vue@latest add https://animate-ui.com/r/vue/backgrounds-hole.json
pnpm dlx shadcn-vue@latest add https://animate-ui.com/r/vue/backgrounds-hole.json
yarn dlx shadcn-vue@latest add https://animate-ui.com/r/vue/backgrounds-hole.json
bun x shadcn-vue@latest add https://animate-ui.com/r/vue/backgrounds-hole.json

Usage

<script setup lang="ts">
import HoleBackground from '@/components/animate-ui/backgrounds/hole/HoleBackground.vue';
</script>

<template>
  <section class="relative h-[480px] overflow-hidden">
    <HoleBackground class="absolute inset-0" />
  </section>
</template>

Animation

  • Rings slide down into a tunnel drawn on a canvas while particles rise out of it, under a glowing aurora that scrolls through its colors every 5s.
  • The canvas is sized to its container at the device pixel ratio. The rings and particles advance one step per displayed frame, so they move faster on 120Hz screens.
  • It pauses off screen and while the tab is hidden.
  • Under reduced motion, the tunnel, the particles and the aurora hold still.

API Reference

HoleBackground

PropTypeDefault
stroke-color?
string'#737373'
number-of-lines?
number50
number-of-discs?
number50
particle-r-g-b-color?
[number, number, number][255, 255, 255]
...attrs?
HTMLAttributes-

Credits

Built by Skyleen. The source code is available on GitHub.

Last updated: 10/23/2026