For Tailwind CSS v3 docs, click here.

泡泡背景

An animated background with floating bubbles.

通过 CLI 安装

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://registry.inspira-ui.com/bubbles-bg.json"

手动安装

Install the dependencies

npm
pnpm
bun
yarn
npm install three
npm install -D @types/three

复制并粘贴以下代码:

BubblesBg.vue

Example

Without Blur or overlay

API

Prop 名称类型默认值描述
blurnumber0Amount of blur to apply to the background, specified in pixels.

功能特性

  • Animated Bubble Background: Renders a captivating background with animated, floating bubbles using 3D graphics.
  • Dynamic Color Gradients: The bubbles and background smoothly transition between colors over time, creating a visually engaging effect.
  • Customizable Blur Effect: Use the blur prop to adjust the blur intensity applied over the background, enhancing depth perception.
  • Slot Support: Easily overlay content on top of the animated background using the default slot.
  • Responsive Design: The component adjusts to fit the width and height of its parent container, ensuring compatibility across different screen sizes.

感谢