mcpField
R
reactbits-ui-skills

reactbits-ui-skills

github.com/lumacoderDesign & UI661 installsUpdated 35w ago
Repository

About reactbits-ui-skills

reactbits-ui-skills guides AI-assisted development of React pages and UI components by matching natural-language requirements to React Bits components and producing copy-ready TSX. It prioritizes the component library and uses TypeScript with Tailwind by default.

Key features

  1. 01Parse page, style, and animation requirements
  2. 02Match React Bits components to descriptions
  3. 03Combine components for common page scenarios
  4. 04Generate TSX with imports and props
  5. 05Provide install commands and documentation links

Use cases

  1. 01Choose backgrounds, headings, and feature cards for a landing page
  2. 02Find animation components from visual effect descriptions
  3. 03Combine statistics and list components for a data page
  4. 04Generate copy-ready React UI component code

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/lumacoder/react-bits-skills --skill reactbits-ui-skills

After installing, type/reactbits-ui-skillsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
examples/
dashboard.tsx
portfolio.tsx
landing-page.tsx
resources/
component-catalog.md
quick-start.md
antigravity-guide.md
natural-language-guide.md
test/
interactive-test.html
test-skill.js
test/output/
cyberpunk-hero.tsx
hero-section.tsx
test-report.md
test-prompts.md
feature-cards.tsx

Details

From the project README

React Bits UI Skill

角色:你是 React Bits 框架专家。当用户要求开发前端页面或 UI 组件时,你必须优先从 React Bits 组件库中选择最合适的组件进行组合,产出可直接复制使用的标准化代码片段。

核心原则

  1. 框架优先:所有可视化/动效需求,先查组件目录,命中则必用
  2. 聚焦组件:只产出页面/组件代码,不涉及脚手架、路由、构建配置
  3. 默认变体:TS + Tailwind(TS-TW),用户明确要求时切换
  4. 代码完整:产出包含 import、Props、样式的完整可运行代码块
  5. 自然语言理解:用户用自然语言描述需求时,自动解析意图并匹配组件

三步工作流

用户需求 → ❶ 意图解析 → ❷ 组件智能匹配 → ❸ 代码产出
❶ 意图解析(自然语言→结构化需求)

从用户描述中提取以下维度:

维度示例关键词对应组件类别
页面类型落地页、官网、仪表盘、数据大屏、个人主页、作品集决定整体布局
视觉风格科技感、极简、赛博朋克、优雅、复古、游戏风决定背景+配色
区块需求标题、卡片、导航、数据展示、画廊决定具体组件
动效强度炫酷、 subtle、静态决定动画复杂度

解析示例:

  • 用户说"做个科技感强的大标题" → 需要 Hero区 + 科技背景 + 文字动画
  • 用户说"展示数据的卡片,鼠标移过去有特效" → 需要 SpotlightCard/GlareHover + CountUp
  • 用户说"底部导航像Mac那样" → 需要 Dock
❷ 组件智能匹配

规则1:自然语言关键词→组件映射

用户描述中的关键词自动映射到对应组件:

"极光背景" → Aurora
"粒子效果" → Particles
"鼠标跟随光效" → SpotlightCard
"数字滚动" → CountUp
"解密动画" → DecryptedText
"故障风" → GlitchText
"macOS导航" → Dock
"光泽文字" → ShinyText
"模糊淡入" → BlurText
"3D倾斜卡片" → TiltedCard
"玻璃质感" → GlassSurface/FluidGlass
"瀑布流" → Masonry
"轮播" → Carousel

规则2:场景组合推荐

根据常见场景,自动组合多个组件:

场景自动组合方案
SaaS落地页Aurora背景 + BlurText标题 + SpotlightCard特性卡 + ShinyText CTA
数据大屏Particles背景 + DecryptedText标题 + CountUp数字 + AnimatedList
作品集Silk背景 + ScrollFloat标题 + Masonry画廊 + ProfileCard
科技公司官网Beams背景 + SplitText标题 + MagicBento网格 + Dock导航
赛博朋克风FaultyTerminal背景 + GlitchText + PixelCard + LaserFlow边框
极简商务DotGrid背景 + ScrollReveal文字 + FloatingLines分隔

规则3:组件选择决策树

用户需要什么?
├── 背景效果
│   ├── 科技感 → Particles / Aurora / Beams
│   ├── 优雅 → Silk / Aurora / Waves
│   ├── 赛博 → FaultyTerminal / GridScan / Glitch背景
│   └── 极简 → DotGrid / Squares / DarkVeil
├── 文字动画
│   ├── 标题入场 → BlurText / SplitText
│   ├── 强调动效 → ShinyText / GradientText
│   ├── 科技解密 → DecryptedText / ScrambledText
│   └── 故障风 → GlitchText
├── 内容卡片
│   ├── 鼠标光效 → SpotlightCard / GlareHover
│   ├── 3D交互 → TiltedCard / ReflectiveCard
│   └── 玻璃质感 → FluidGlass / GlassSurface
├── 数据展示
│   ├── 数字动画 → CountUp / Counter
│   └── 列表动画 → AnimatedList
└── 导航
    ├── 底部Dock → Dock
    ├── 胶囊Tab → PillNav / GooeyNav
    └── 全屏菜单 → FlowingMenu
❸ 代码产出
  • 产出完整 TSX 代码块,遵循下方代码规范
  • 每个组件标注文档链接供用户深度定制
  • 提供组件安装命令

代码规范

// ✅ 标准 import 格式(组件为本地 copy-paste 文件)
import { BlurText } from './components/BlurText';
import { Aurora } from './components/Aurora';

// ✅ 组件使用:传入必要 Props,保持简洁
<BlurText text="Welcome" delay={150} animateBy="words" />

// ✅ 布局:用 Tailwind 容器包裹 react-bits 组件
<div className="relative min-h-screen overflow-hidden">
  <Aurora colorStops={["#3A29FF", "#FF94B4", "#FF3232"]} />
  <div className="relative z-10 flex items-center justify-center min-h-screen">
    <BlurText text="Hello World" className="text-6xl font-bold text-white" />
  </div>
</div>
安装说明(按需附加)
# shadcn CLI(推荐)
npx shadcn@latest add "@react-bits/BlurText-TS-TW"

# 或 jsrepo CLI
npx jsrepo add github/DavidHDev/react-bits/TextAnimations/BlurText

自然语言→组件速查表

用户用自然语言描述时,参考此表匹配组件

🎯 按效果描述查找
用户说推荐组件说明
"大标题要有动画" / "文字淡入"BlurText最通用的标题动画
"文字一个字一个字出来"SplitText逐字分裂动画
"像解密一样显示文字"DecryptedText科技风解密效果
"故障风格的字"GlitchText赛博朋克故障
"有光泽扫过" / "闪闪发光"ShinyTextCTA按钮文字
"数字从0开始涨" / "数字动画"CountUp统计数字动画
"鼠标放上去有光" / "聚光灯"SpotlightCard卡片光效
"3D倾斜卡片"TiltedCard鼠标跟随倾斜
"玻璃效果" / "毛玻璃"GlassSurface玻璃质感容器
"极光背景"Aurora暗色渐变背景
"粒子背景" / "星空效果"Particles科技感粒子
"mac底部导航" / "Dock栏"DockmacOS风格导航
"像翻牌子一样切换"CardSwap卡片翻转
"图片像瀑布一样排列"Masonry瀑布流布局
"圆形排列的图片"CircularGallery环形画廊
🎨 按风格/主题查找
风格背景文字卡片其他
科技感/科幻Particles, GridScan, BeamsDecryptedText, GlitchTextSpotlightCardLaserFlow
赛博朋克FaultyTerminal, LetterGlitchGlitchText, ScrambledTextPixelCardElectricBorder
极简/商务DotGrid, FloatingLinesBlurText, ScrollRevealGlassSurfaceFadeContent
优雅/高端Silk, Aurora, IridescenceGradientText, ScrollFloatReflectiveCardMagnet
游戏/复古PixelBlast, BalatroFuzzyText, ASCIITextPixelCardClickSpark
创意/艺术LiquidChrome, LiquidEtherVariableProximity, CircularTextImageTrailSplashCursor
📍 按页面区块查找
区块核心组件可选搭配
Hero首屏Aurora/Silk背景 + BlurText标题ShinyText CTA, ScrollFloat副标题
特性展示SpotlightCard卡片网格CountUp统计, GlareHover悬停
数据统计CountUp数字 + CounterAnimatedList列表展示
定价页面TiltedCard/ReflectiveCardStarBorder推荐标记
团队介绍ProfileCard + CircularGalleryOrbitImages轨道展示
作品画廊Masonry瀑布流ImageTrail拖尾效果
底部导航Dock macOS风格PillNav胶囊导航
** testimonials**AnimatedList动画列表ScrollReveal滚动显示

组件速查索引(完整列表)

格式:组件名 — 用途 | 场景标签

💬 TextAnimations(文字动画)
组件用途场景
ASCIITextASCII字符艺术文字极客风、创意着陆页
BlurText模糊淡入文字动画Hero标题、首屏
CircularText环形旋转文字徽章、Logo装饰
CountUp数字递增动画数据统计、成就展示
CurvedLoop曲线循环文字品牌标语、装饰
DecryptedText解密效果文字科技感、安全主题
FallingText物理掉落文字趣味交互、游戏风
FuzzyText模糊抖动文字艺术感标题
GlitchText故障风格文字赛博朋克、科技感
GradientText渐变色文字品牌标题、强调文案
RotatingText文字轮播切换多功能描述、Tagline
ScrambledText乱码解码文字Hover交互、揭示
ScrollFloat滚动浮动文字长页面、阅读体验
ScrollReveal滚动渐显文字内容区域标题
ScrollVelocity速度感滚动文字跑马灯、品牌展示
ShinyText光泽扫过文字CTA按钮文案、徽章
Shuffle文字洗牌动画列表切换、随机展示
SplitText逐字/逐词分裂动画首屏标题动效
TextCursor光标跟随文字打字机效果
TextPressure鼠标压力感应文字交互式标题
TextType打字机效果代码展示、Bot消息
TrueFocus聚焦高亮文字关键词强调
VariableProximity鼠标距离变形文字交互式Hero
🌀 Animations(动画/动效)
组件用途场景
AnimatedContent内容进退场动画通用内容动效包裹
Antigravity反重力悬浮效果创意展示
BlobCursor流体光标跟随全局光标美化
ClickSpark点击火花效果点击反馈、趣味交互
Crosshair十字准星光标精准/科技主题
Cubes3D立方体动画科技背景、加载
ElectricBorder电流边框效果卡片/按钮高亮
FadeContent淡入淡出内容通用内容切换
GhostCursor幽灵跟随光标光标拖尾效果
GlareHover眩光悬停效果卡片Hover
GradualBlur渐进模糊动画内容渐显
ImageTrail图片拖尾效果创意画廊、艺术
LaserFlow激光流动效果科技风边框
LogoLoopLogo无限循环合作品牌展示
Magnet磁吸效果按钮/元素交互
MagnetLines磁力线条动画交互式背景
MetaBalls融球效果抽象艺术、加载
MetallicPaint金属漆质感高端质感展示
Noise噪点/颗粒效果质感叠加
OrbitImages轨道旋转图片产品/团队展示
PixelTrail像素拖尾光标效果
PixelTransition像素化转场图片/页面切换
Ribbons丝带飘动效果装饰性背景
ShapeBlur形状模糊动画抽象装饰
SplashCursor泼墨光标效果创意/艺术站点
StarBorder星光边框动画卡片/按钮装饰
StickerPeel贴纸撕开效果趣味卡片交互
TargetCursor目标瞄准光标游戏/竞技主题
🧩 Components(UI组件)
组件用途场景
AnimatedList列表进场动画动态列表、通知流
BounceCards弹跳卡片组团队/产品展示
BubbleMenu气泡弹出菜单悬浮工具栏
CardNav卡片导航分类导航
CardSwap卡片翻转切换Before/After对比
Carousel轮播组件图片/内容轮播
ChromaGrid色彩网格图片网格展示
CircularGallery环形画廊作品集展示
Counter动画计数器统计数据展示
DecayCard衰变卡片时间线/历史
DockmacOS风格Dock底部导航栏
DomeGallery穹顶画廊沉浸式画廊
ElasticSlider弹性滑块范围选择器
FlowingMenu流动菜单全屏导航
FluidGlass流体玻璃效果磨砂玻璃卡片
FlyingPosters飞行海报作品/产品展示
Folder文件夹组件文件管理UI
GlassIcons玻璃态图标功能图标组
GlassSurface玻璃质感表面毛玻璃容器
GooeyNav粘连导航底部Tab导航
InfiniteMenu无限滚动菜单3D菜单
Lanyard挂绳/吊牌个人名片
MagicBento魔法Bento网格功能展示网格
Masonry瀑布流布局图片/作品瀑布流
ModelViewer3D模型查看器产品3D展示
PillNav胶囊导航Tab切换
PixelCard像素风卡片游戏/复古风
ProfileCard个人资料卡用户/团队展示
ReflectiveCard反射卡片高端产品展示
ScrollStack滚动堆叠特性逐层展示
SpotlightCard聚光灯卡片核心功能展示
Stack堆叠卡片通知/消息堆叠
StaggeredMenu交错出场菜单移动端菜单
Stepper步骤条表单流程/引导
TiltedCard倾斜卡片3D视差卡片
🖼️ Backgrounds(动态背景)
组件用途场景
Aurora极光背景Hero、暗色主题
Balatro扑克牌纹理背景游戏/趣味
Ballpit球坑物理效果趣味/创意
Beams光束效果科技/SaaS
ColorBends色彩弯曲艺术/创意
DarkVeil暗幕背景暗色Hero
Dither抖动/点阵复古风
DotGrid点阵网格极简/技术文档
FaultyTerminal故障终端开发者/黑客风
FloatingLines浮动线条极简/商务
Galaxy星系背景太空/科幻
GradientBlinds渐变百叶窗过渡区域
Grainient噪点渐变高端/质感
GridDistortion网格扭曲交互式背景
GridMotion网格运动图片网格背景
GridScan网格扫描科技/安全
Hyperspeed超速星际加载/过渡
Iridescence虹彩效果高端/时尚
LetterGlitch字母故障科技背景
LightPillar光柱效果聚焦/高亮
LightRays光线放射展示/发布
Lightning闪电效果力量/能量
LiquidChrome液态铬高端/金属
LiquidEther液态以太梦幻/流动
Orb光球装饰/背景点缀
Particles粒子效果通用科技背景
PixelBlast像素爆炸游戏/冲击
PixelSnow像素雪花季节/节日
Plasma等离子体科幻/能量
Prism棱镜折射色彩/艺术
PrismaticBurst棱镜爆发发布/庆典
RippleGrid涟漪网格交互式背景
Silk丝绸流动优雅/时尚
Squares方块动画极简/几何
Threads线程/纤维科技/连接
Waves波浪效果分区过渡

场景→组件速查

场景需求推荐组合
Hero首屏Aurora/Silk背景 + BlurText/SplitText标题 + ShinyText CTA
功能展示SpotlightCard/MagicBento卡片 + Counter统计 + GlareHover悬停
团队/作品CircularGallery/Masonry画廊 + ProfileCard人物卡
品牌合作LogoLoop品牌墙 + ScrollVelocity跑马灯
定价页TiltedCard/ReflectiveCard价格卡 + StarBorder推荐标记
导航/菜单Dock/PillNav/GooeyNav导航 + FlowingMenu全屏菜单
科技/开发者FaultyTerminal/Particles背景 + DecryptedText/GlitchText文字
数据统计CountUp数字 + Counter组件 + AnimatedList列表

代码产出模板

Hero Section 模板
import { Aurora } from "./components/Aurora";
import { BlurText } from "./components/BlurText";
import { ShinyText } from "./components/ShinyText";

export default function HeroSection() {
  return (
    <section className="relative min-h-screen overflow-hidden bg-black">
      {/* 背景层 */}
      <Aurora
        colorStops={["#3A29FF", "#FF94B4", "#FF3232"]}
        blend={0.5}
        amplitude={1.0}
        speed={0.5}
      />

      {/* 内容层 */}
      <div className="relative z-10 flex flex-col items-center justify-center min-h-screen gap-6 px-4">
        <BlurText
          text="Build Something Amazing"
          delay={150}
          animateBy="words"
          className="text-5xl md:text-7xl font-bold text-white text-center"
        />
        <p className="text-lg text-white/70 max-w-2xl text-center">
          Ship stunning interfaces faster with production-ready animated
          components.
        </p>
        <button className="mt-4 px-8 py-3 rounded-full bg-white/10 backdrop-blur border border-white/20 hover:bg-white/20 transition">
          <ShinyText
            text="Get Started →"
            speed={3}
            className="text-white font-medium"
          />
        </button>
      </div>
    </section>
  );
}
Feature Cards 模板
import { SpotlightCard } from "./components/SpotlightCard";
import { GlareHover } from "./components/GlareHover";
import { CountUp } from "./components/CountUp";

const features = [
  { icon: "⚡", title: "Lightning Fast", desc: "Optimized for performance" },
  { icon: "🎨", title: "Beautiful UI", desc: "Pixel-perfect components" },
  { icon: "🔧", title: "Customizable", desc: "Tweak everything via props" },
];

export default function FeatureSection() {
  return (
    <section className="py-24 px-4 bg-neutral-950">
      <div className="max-w-6xl mx-auto">
        <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
          {features.map((f, i) => (
            <SpotlightCard
              key={i}
              className="p-8 rounded-2xl bg-neutral-900 border border-neutral-800"
            >
              <span className="text-4xl">{f.icon}</span>
              <h3 className="mt-4 text-xl font-semibold text-white">
                {f.title}
              </h3>
              <p className="mt-2 text-neutral-400">{f.desc}</p>
            </SpotlightCard>
          ))}
        </div>

        {/* 统计数据 */}
        <div className="mt-16 flex justify-center gap-16">
          <div className="text-center">
            <CountUp
              from={0}
              to={117}
              className="text-4xl font-bold text-white"
            />
            <p className="text-neutral-500 mt-1">Components</p>
          </div>
          <div className="text-center">
            <CountUp
              from={0}
              to={10000}
              separator=","
              className="text-4xl font-bold text-white"
            />
            <p className="text-neutral-500 mt-1">Downloads</p>
          </div>
        </div>
      </div>
    </section>
  );
}

多AI工具配置指南

Claude Code

将本目录添加为 skill,Claude 会自动读取 SKILL.md。

# 配置文件路径
~/.claude/skills/reactbits-ui-skills/SKILL.md

# 或使用环境变量
export CLAUDE_SKILLS_PATH=/path/to/skills
OpenCode
# 安装 skill
opcode skill add reactbits-ui-skills https://github.com/lumacoder/reactbits-ui-skills

# 或使用本地路径
opcode skill add reactbits-ui-skills /path/to/reactbits-ui-skills
Gemini CLI
# 在 .gemini/skills/ 目录下克隆
git clone https://github.com/lumacoder/reactbits-ui-skills.git ~/.gemini/skills/reactbits-ui-skills

# 或在配置中指定 skill 路径
echo '{"skills": ["/path/to/reactbits-ui-skills"]}' > ~/.gemini/config.json
GitHub Copilot

将本 SKILL.md 内容添加到 Copilot 的自定义指令中:

  1. 打开 VS Code Settings
  2. 搜索 "Copilot Instructions"
  3. 添加本 SKILL.md 的路径
Cursor
# 将 SKILL.md 内容添加到 Cursor 的 Project Rules
# 或创建 .cursor/rules/reactbits.mdc 文件

重要提示

  • 文档链接:https://reactbits.dev/text-animations/{组件名} / https://reactbits.dev/animations/{组件名} / https://reactbits.dev/components/{组件名} / https://reactbits.dev/backgrounds/{组件名}
  • Pro版组件(65+ Blocks)需 Pro License:https://pro.reactbits.dev
  • 组件为 copy-paste 模式,无 npm 包依赖,直接复制源码到项目中
  • 部分组件依赖 framer-motion,需确保项目已安装

测试验证

使用测试工具验证 Skill 功能:

# 运行完整测试
node test/test-skill.js

# 在浏览器中打开交互式测试工具
test/interactive-test.html

测试内容包括:

  1. Skill 文件结构验证
  2. 自然语言→组件映射测试
  3. 示例代码生成
  4. Antigravity 集成检查

Comments

Markdown supported