For Tailwind CSS v3 docs, click here.

Sparkles

A configurable sparkles component that can be used as a background or as a standalone component.

通过 CLI 安装

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

手动安装

复制并粘贴以下代码:

Sparkles.vue

示例

Sparkles Full Page

API

Prop 名称类型默认值描述
backgroundstring'#0d47a1'Background color of the container. Use 'transparent' to see through to parent element.
particleColorstring'#ffffff'Color of the particles. Accepts any valid CSS color value.
minSizenumber1Minimum size of particles in pixels.
maxSizenumber3Maximum size of particles in pixels.
speednumber4Movement speed multiplier. Higher values create faster movement.
particleDensitynumber120Number of particles to render. Higher values create denser particle fields.

感谢