Atelier UI

搜索组件…

搜索组件…

Text Scramble

文字先随机乱码闪烁再逐字还原,悬停或聚焦时重新播放。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

TextScrambleProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"span">, "children">

属性类型默认值说明
text* 必填string—The final text
durationnumber900Total scramble time in ms
charsstringDEFAULT_CHARSGlyphs used while scrambling
triggerunknown—Change this value to replay the effect
scrambleOnHoverbooleantrueReplay on hover and keyboard focus

安装

$ npx shadcn@latest add https://chromotion.dev/r/text-scramble.json

同类组件