瑚琏 Hulianv0.93.5413 组件0 组件
  • 开始
  • 组件
  • 区块
  • 页面
  • 模版
  • 更新
中文EN
  • 组件组件
  • 主题主题

背景

  • 点阵背景
  • 网格背景
  • 斜条纹背景
  • 径向辉光背景
  • 渐隐遮罩
  • 复古透视网格
  • 同心脉冲圆环
  • 流星雨
  • 极光渐变背景
  • 交互粒子场
  • 闪烁网格
  • 噪声波浪
  • 丝绸流动背景
  • 虹彩光泽背景
  • 流动丝线背景
  • 指针交互光球
  • 液态铬背景
  • 螺旋油彩
  • 彩球球池
  • 流动光柱
  • 多色流场
  • 暗色帷幕
  • 抖动波纹
  • 交互式点阵背景
  • 火焰邪眼
  • 故障终端雨
  • 铁磁流体
  • 漂浮线束
  • 视差星河
  • 渐变百叶窗
  • 颗粒渐变
  • 网格扭曲
  • 倾斜网格视差
  • 扫描网格
  • 跃迁隧道
  • 字符故障雨
  • 光束坠落
  • 电弧极光
  • 体积光柱
  • 光束放射
  • 波纹线阵
  • 液态色域
  • 点阵翻涌
  • 像素雪场
  • 等离子流动
  • 等离子波
  • 棱镜分光
  • 棱镜光爆
  • 雷达扫描
  • 涟漪网格
  • 几何网格
  • 侧光束
  • 柔和极光

覆盖特效

  • 边框光束
  • 流光边框
  • 反光悬停
  • 放大镜
  • 动效光束
  • 轨道环绕
  • 渐进模糊
  • 聚光卡片
  • 逐级揭示
  • 反重力粒子
  • 果冻光标
  • 点击火花
  • 准星十字线
  • 通电边框
  • 幽灵拖尾光标
  • 渐进贴边模糊
  • 光标图片拖尾
  • 激光束
  • 魔法光环
  • 指针磁吸
  • 磁力线网格
  • 黏液融球
  • 液态金属漆面
  • 轨道环绕
  • 像素余晖拖尾
  • 像素转场卡
  • 飘带跟随
  • 模糊形状高光
  • 流体溅射光标
  • 流星描边按钮
  • 可拖拽贴纸
  • 准星光标
  • 立方体阵列
  • 视差倾斜包裹器
  • 发光边框卡
  • 玻璃图标网格
  • 液态玻璃折射面
  • 挂绳工牌
  • 3D 模型舞台
  • 流体玻璃

LightPillar

light-pillar

一根上下双色渐变、内部持续翻涌的体积光柱

用法

基础用法

默认顶/底色吃 chart token,组件自带 absolute inset-0 z-0。

LightPillar
tsx
<div className="relative h-64 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.12 0.02 270)" }}>
  <LightPillar />
  <div className="relative z-10 flex h-full items-center justify-center text-sm font-medium text-white/80">
    LightPillar
  </div>
</div>

自定义双色(原版紫→粉)

topColor / bottomColor 沿 y 轴渐变混合,构成色彩纵深。

tsx
<div className="relative h-64 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.12 0.02 270)" }}>
  <LightPillar topColor="#5227FF" bottomColor="#FF9FFC" intensity={1.1} />
</div>

细激光(窄柱·无颗粒)

pillarWidth 调细 + glowAmount 提亮,noiseIntensity=0 去颗粒。

tsx
<div className="relative h-64 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.12 0.02 270)" }}>
  <LightPillar pillarWidth={1.4} glowAmount={0.009} noiseIntensity={0} intensity={1.2} />
</div>

倾斜光柱(慢转)

pillarRotation 让光柱斜射,rotationSpeed 调慢自转。

tsx
<div className="relative h-64 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.12 0.02 270)" }}>
  <LightPillar pillarRotation={30} rotationSpeed={0.15} pillarWidth={2.4} />
</div>

何时用

需要单根顶底渐变的体积光柱做居中 hero 焦点时用。要随机闪烁的电弧/极光柱用 Lightning;要放射状多束光用 LightRays;要坠落光束用 Lightfall。

导入

ts
import { LightPillar } from "@hulianui/ui"

Props

名称类型默认说明
topColorstringvar(--color-chart-2)光柱顶部颜色,任意 CSS 颜色,默认 token 明暗自适应
bottomColorstringvar(--color-chart-1)光柱底部颜色,与顶色沿 y 轴渐变混合
intensitynumber1整体亮度系数,越大越亮
rotationSpeednumber0.3自转速度因子,同时驱动时间推进,0=几乎静止
glowAmountnumber0.005辉光强度(raymarch 累积增益),建议 0.001-0.02
pillarWidthnumber3光柱粗细(世界半径),越小越细如激光
pillarHeightnumber0.4光柱高度系数,越大纵向条纹越密
noiseIntensitynumber0.5颗粒噪声强度,0=纯净无颗粒
pillarRotationnumber0光柱整体倾斜角度(度),例 30=向一侧斜射
classNamestring-透传 canvas 容器(或 fallback div)

Slots

插槽类型说明
fallbackReactNodereduced-motion / 无 WebGL 时的静态替代内容,默认 token 渐变光柱

禁忌 / 坑

  • ogl/WebGL 仅客户端;SSR / 无 WebGL 出 fallback(token 渐变),reduced-motion 下降级。
  • glowAmount 量级很小(默认 0.005),调亮时小步加(如 0.009),数量级跳大会过曝。
  • topColor/bottomColor 传 CSS 变量须用 --color- 前缀 token,见 [[hulian-token-color-var-needs-color-prefix]]。
  • 全屏背景层在 opaque 背景的非层叠上下文父级里可能被父背景盖住,见 [[webgl-canvas-rendered-but-invisible-negative-zindex-covered]]。

相关

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Ripple

Playground

<div className="relative h-64 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.12 0.02 270)" }}>
  <LightPillar
    intensity={1}
    rotationSpeed={0.3}
    pillarWidth={3}
    noiseIntensity={0.5}
  />
</div>
上一个电弧极光装饰下一个光束放射

本页

  • 用法
  • 文档
    • 何时用
    • 导入
    • Props
    • Slots
    • 禁忌 / 坑
    • 相关
  • Playground