For Tailwind CSS v3 docs, click here.

Warp Background

A container component that applies a warp animation effect to its children

通过 CLI 安装

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

手动安装

在同一个文件中,复制并粘贴以下代码:

WarpBackground.vue
Beam.vue

API

Prop 名称类型默认值描述
perspectivenumber100The perspective of the warp animation
beamsPerSidenumber3The number of beams per side
beamSizenumber5The size of the beams
beamDelayMaxnumber3The maximum delay of the beams in seconds
beamDelayMinnumber0The minimum delay of the beams in seconds
beamDurationnumber3The duration of the beams
gridColorstring"hsl(var(--border))"The color of the grid lines

感谢