For Tailwind CSS v3 docs, click here.

灯光效果

A captivating lamp lighting effect with conic gradients, spotlights, and glowing lines for an immersive visual experience.

通过 CLI 安装

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

手动安装

复制并粘贴以下代码:

LampEffect.vue

API

Prop 名称类型默认值描述
delaynumber0.5Delay before the animation starts, in seconds.
durationnumber0.8Duration of the animation, in seconds.
classstring""Additional CSS classes for custom styling.

功能特性

  • Conic Gradient Animation: Creates a smooth expanding conic gradient effect, giving a dynamic light-source appearance.
  • Spotlight Animation: The spotlight smoothly expands, providing a focused lighting effect.
  • Glowing Line Effect: A glowing line animates across the center, simulating a light beam or laser.
  • Customizable Timing: The delay and duration props allow for precise control of animation timings.
  • Slot-Based Content: Supports default slot content, making it easy to overlay text or other components.

感谢