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

背景

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

覆盖特效

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

Ripple

ripple

从一个原点向外扩散一圈圈同心光环

用法

基础用法

relative + place-items-center 容器内放一层 Ripple 即得同心脉冲圆环,常作 hero/空状态背景。

Ripple
tsx
<div className="relative grid h-56 w-full place-items-center overflow-hidden rounded-xl border border-border bg-surface">
  <Ripple />
  <span className="z-10 text-sm font-medium">Ripple</span>
</div>

圈数与起始尺寸

numCircles 控制圈数,mainCircleSize 控制最内圈直径——少圈更聚焦。

Ripple
tsx
<div className="relative grid place-items-center ...">
  <Ripple mainCircleSize={140} numCircles={5} />
</div>

改色与不透明度

边框取 currentColor,用 text-* 换色;mainCircleOpacity 调整最内圈起始不透明度。

Ripple
tsx
<div className="relative grid place-items-center ...">
  <Ripple mainCircleSize={150} className="text-primary" mainCircleOpacity={0.35} />
</div>

何时用

中心向外扩散的同心脉冲(雷达扫描、信号广播、CTA 焦点氛围)。要脉冲圆环用本组件;要静态径向辉光用 Spotlight,要规整纹理用 DotPattern / GridPattern。

导入

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

Props

名称类型默认说明
mainCircleSizenumber210最内圈直径 px
mainCircleOpacitynumber0.24最内圈不透明度
numCirclesnumber8圈数
继承 ComponentPropsWithoutRef<"div">。颜色取 currentColor,用 text-* 工具类控制。

禁忌 / 坑

  • 内部 absolute inset-0 铺满父级,须放在 relative 定位容器内,通常配 grid place-items-center 让脉冲从内容中心扩散。
  • 含逐圈延迟的 CSS 动画,已内置 prefers-reduced-motion 降级。

相关

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Meteors

Playground

Ripple
<div className="relative grid place-items-center">
  <Ripple mainCircleSize={180} numCircles={8} />
</div>
上一个复古透视网格装饰下一个流星雨

本页

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