For Tailwind CSS v3 docs, click here.

炫彩涡流

A wavy, swirly, vortex background ideal for CTAs and backgrounds.

通过 CLI 安装

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

手动安装

Install the dependencies

npm
pnpm
bun
yarn
npm install simplex-noise

复制并粘贴以下代码:

Vortex.vue

Example

Full page demo usage

API

Prop 名称类型默认值描述
classstringOptional className for styling the children wrapper.
containerClassstringOptional className for styling the container.
particleCountnumber700Number of particles to be generated.
rangeYnumber100Vertical range for particle movement.
baseHuenumber220Base hue for particle color.
baseSpeednumber0.0Base speed for particle movement.
rangeSpeednumber1.5Range of speed variation for particles.
baseRadiusnumber1Base radius of particles.
rangeRadiusnumber2Range of radius variation for particles.
backgroundColorstring"#000000"Background color of the canvas.

功能特性

  • Slot Support: Easily add any content inside the component using the default slot.

感谢