magicui

使用 Magic UI 为落地页和营销网站添加动画 React UI 组件。适用于添加动画 UI 组件、构建有吸引力的落地页、创建粒子效果、文本动画、数字计数器、闪烁按钮以及在 React 中实现视觉效果的场景。基于 Tailwind CSS,兼容 shadcn/ui。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
7

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "magicui":https://skillpi.com/zh/skills/deepskill-33053ab3ae23632bf41fd3a5e12ead4aae0b2ee87bbe0ca3e4393a72bd456749。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

使用 Magic UI 为落地页和营销网站添加动画 React UI 组件。适用于添加动画 UI 组件、构建有吸引力的落地页、创建粒子效果、文本动画、数字计数器、闪烁按钮以及在 React 中实现视觉效果的场景。基于 Tailwind CSS,兼容 shadcn/ui。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: magicui
description: >-
  Add animated React UI components for landing pages and marketing sites with Magic UI.
  Use when: adding animated UI components, building impressive landing pages, creating
  particle effects, text animations, number counters, shimmer buttons, and visual
  effects in React. Tailwind CSS based and shadcn/ui compatible.
license: Apache-2.0
compatibility: "Requires React 18+, Tailwind CSS 3+, Node.js 18+"
metadata:
  author: terminal-skills
  version: "1.0.0"
  category: design
  tags: ["magicui", "react", "animations", "ui-components", "tailwind"]
  use-cases:
    - "Add a particle/confetti effect to a landing page hero section"
    - "Create an animated number counter for displaying stats"
    - "Build a shimmer button with gradient animation for CTAs"
    - "Add a scrolling marquee for logos or testimonials"
    - "Create sparkle text for highlighting key phrases"
  agents: [claude-code, openai-codex, gemini-cli, cursor]

Magic UI

Overview

Magic UI is a collection of animated React components built on Tailwind CSS and shadcn/ui. Components are installed via CLI directly into your project — you own the source code and can customize freely.

Key traits:

  • CLI-based install (no runtime package dependency)
  • Tailwind CSS + CSS variables for theming
  • shadcn/ui compatible
  • TypeScript first

Setup

Prerequisites

# Must have Tailwind CSS configured
npm install tailwindcss @tailwindcss/typography
# Must have shadcn/ui initialized (or manual cn utility)
npx shadcn@latest init

Install a component

npx magicui-cli add <component-name>

This copies the component source into components/magicui/.

Component Catalog & Examples

1. AnimatedBeam — connecting lines between elements

npx magicui-cli add animated-beam
import { AnimatedBeam } from "@/components/magicui/animated-beam";
import { useRef } from "react";

export function BeamDemo() {
  const containerRef = useRef<HTMLDivElement>(null);
  const fromRef = useRef<HTMLDivElement>(null);
  const toRef = useRef<HTMLDivElement>(null);

  return (
    <div ref={containerRef} className="relative flex h-64 items-center justify-between p-10">
      <div ref={fromRef} className="h-12 w-12 rounded-full bg-blue-500" />
      <div ref={toRef} className="h-12 w-12 rounded-full bg-purple-500" />
      <AnimatedBeam containerRef={containerRef} fromRef={fromRef} toRef={toRef} />
    </div>
  );
}

2. Marquee — infinite scrolling ticker

npx magicui-cli add marquee
import Marquee from "@/components/magicui/marquee";

const logos = ["Vercel", "Stripe", "Linear", "Notion", "Figma"];

export function LogoMarquee() {
  return (
    <Marquee pauseOnHover className="[--duration:20s]">
      {logos.map((name) => (
        <div key={name} className="mx-8 text-xl font-semibold text-muted-foreground">
          {name}
        </div>
      ))}
    </Marquee>
  );
}

3. ShimmerButton — animated gradient CTA

npx magicui-cli add shimmer-button
import { ShimmerButton } from "@/components/magicui/shimmer-button";

export function HeroCTA() {
  return (
    <ShimmerButton
      shimmerColor="#ffffff"
      shimmerSize="0.1em"
      shimmerDuration="2s"
      background="linear-gradient(135deg, #6366f1, #8b5cf6)"
      className="px-8 py-3 text-white font-semibold"
    >
      Get Started Free →
    </ShimmerButton>
  );
}

4. NumberTicker — animated counting up

npx magicui-cli add number-ticker
import NumberTicker from "@/components/magicui/number-ticker";

export function StatsSection() {
  return (
    <div className="grid grid-cols-3 gap-8 text-center">
      <div>
        <NumberTicker value={10000} className="text-5xl font-bold" />
        <p className="text-muted-foreground">Active Users</p>
      </div>
      <div>
        <NumberTicker value={99} className="text-5xl font-bold" />
        <span className="text-5xl font-bold">%</span>
        <p className="text-muted-foreground">Uptime</p>
      </div>
      <div>
        <NumberTicker value={500} className="text-5xl font-bold" />
        <p className="text-muted-foreground">Customers</p>
      </div>
    </div>
  );
}

5. SparklesText — glittering highlight text

npx magicui-cli add sparkles-text
import SparklesText from "@/components/magicui/sparkles-text";

export function HeroHeading() {
  return (
    <h1 className="text-6xl font-bold">
      Build{" "}
      <SparklesText text="faster" colors={{ first: "#6366f1", second: "#ec4899" }} />
      {" "}with AI
    </h1>
  );
}

6. Ripple — pulsing circle effect

npx magicui-cli add ripple
import { Ripple } from "@/components/magicui/ripple";

export function HeroBackground() {
  return (
    <div className="relative flex h-96 items-center justify-center overflow-hidden bg-background">
      <Ripple mainCircleSize={200} numCircles={8} />
      <p className="z-10 text-4xl font-bold">Connect Everything</p>
    </div>
  );
}

7. Confetti — celebration burst

npx magicui-cli add confetti
import { useConfetti } from "@/components/magicui/confetti";

export function SuccessButton() {
  const { fire } = useConfetti();

  return (
    <button
      onClick={() => fire({ particleCount: 100, spread: 70, origin: { y: 0.6 } })}
      className="rounded-lg bg-green-500 px-6 py-3 text-white font-semibold"
    >
      🎉 Complete Purchase
    </button>
  );
}

8. Meteors — falling meteor streaks background

npx magicui-cli add meteors
import { Meteors } from "@/components/magicui/meteors";

export function HeroCard() {
  return (
    <div className="relative overflow-hidden rounded-2xl border bg-background p-8">
      <Meteors number={20} />
      <h2 className="relative z-10 text-3xl font-bold">Your Product Name</h2>
      <p className="relative z-10 mt-2 text-muted-foreground">Tagline goes here</p>
    </div>
  );
}

9. BlurIn — text fade-in with blur

npx magicui-cli add blur-in
import BlurIn from "@/components/magicui/blur-in";

export function AnimatedHero() {
  return (
    <BlurIn
      word="The Future of Development"
      className="text-5xl font-bold tracking-tight"
      duration={1.2}
    />
  );
}

10. Globe — 3D interactive globe

npx magicui-cli add globe
import Globe from "@/components/magicui/globe";

export function GlobalSection() {
  return (
    <div className="flex flex-col items-center">
      <h2 className="text-3xl font-bold">Available Worldwide</h2>
      <Globe className="h-[500px] w-[500px]" />
    </div>
  );
}

Full Landing Page Pattern

// app/page.tsx — typical hero section with Magic UI components
import BlurIn from "@/components/magicui/blur-in";
import { ShimmerButton } from "@/components/magicui/shimmer-button";
import { Ripple } from "@/components/magicui/ripple";
import Marquee from "@/components/magicui/marquee";
import NumberTicker from "@/components/magicui/number-ticker";

export default function LandingPage() {
  return (
    <main>
      {/* Hero */}
      <section className="relative flex h-screen flex-col items-center justify-center text-center">
        <Ripple mainCircleSize={300} numCircles={6} />
        <BlurIn word="Ship Faster Than Ever" className="z-10 text-6xl font-bold" />
        <p className="z-10 mt-4 text-xl text-muted-foreground">
          The platform that gets you from idea to production
        </p>
        <ShimmerButton className="z-10 mt-8">Start for free</ShimmerButton>
      </section>

      {/* Social proof logos */}
      <section className="py-12">
        <Marquee className="[--duration:30s]">
          {["Company A", "Company B", "Company C", "Company D", "Company E"].map((name) => (
            <span key={name} className="mx-12 text-lg text-muted-foreground">{name}</span>
          ))}
        </Marquee>
      </section>

      {/* Stats */}
      <section className="py-20 text-center">
        <div className="grid grid-cols-3 gap-12">
          <div><NumberTicker value={50000} className="text-4xl font-bold" /><p>Users</p></div>
          <div><NumberTicker value={99} className="text-4xl font-bold" /><span>%</span><p>Uptime</p></div>
          <div><NumberTicker value={200} className="text-4xl font-bold" /><span>+</span><p>Countries</p></div>
        </div>
      </section>
    </main>
  );
}

Available Components (full list)

# Run to see all available components
npx magicui-cli list

Popular ones: animated-beam, animated-gradient-text, animated-grid-pattern, animated-list, animated-shiny-text, aurora-text, blur-in, blur-fade, border-beam, confetti, cool-mode, dock, dot-pattern, file-tree, flip-text, globe, grid-pattern, hyper-text, interactive-hover-button, letter-pullup, magic-card, marquee, meteors, morphing-text, neon-gradient-card, number-ticker, orbiting-circles, particles, pointer, pulsating-button, rainbow-button, retro-grid, ripple, safari, scroll-based-velocity, shimmer-button, shine-border, shiny-button, sparkles-text, spinning-text, terminal, text-reveal, ticker, typing-animation, vanish-input, wavy-text, word-fade-in, word-pull-up, word-rotate

Troubleshooting

Issue Fix
cn not found Install clsx + tailwind-merge and add lib/utils.ts
Animation not working Check tailwind.config.ts has darkMode: "class" and CSS vars defined
Component not found Run npx magicui-cli@latest add <name> (use @latest)
Peer dep warnings Magic UI needs React 18+ and Tailwind 3+

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供丰富的动画 React 组件库,解决前端开发中的实际需求
  • 适用于落地页、营销网站等高频使用场景
  • 具有明确的实用价值和广泛的目标用户群体
触发精准90/100

亮点

  • description 完整描述了使用场景和触发条件
  • 覆盖多种动画组件使用场景,边界清晰
  • 不易与其他 Skill 产生重叠或混淆
结构规范95/100

待提升项

  • 文档长度 原报告严重程度:轻微

    文档内容较为详细,总长度超过500行

    改进建议:考虑将部分内容拆分为单独的文件或使用折叠章节提高可读性

亮点

  • 结构清晰完整,包含 Overview、Setup、Component Catalog 等必要章节
  • 每个组件都提供了完整的安装命令和使用示例
  • frontmatter 信息完整,包含许可证、兼容性要求等关键信息
  • 提供了完整的落地页模式示例,便于用户理解整体应用
执行可靠90/100

亮点

  • 提供了清晰的 prerequisites 和安装步骤
  • 每个组件都有具体的安装命令和使用示例
  • 提供了 troubleshooting 指南,帮助用户解决常见问题
  • 兼容性要求明确,减少执行失败的风险
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。