Single logo
  • Courses
  • Blog
  • About
Join on SkoolJoin on Skool

In this topic

React
  • Backend vs Frontend: What Runs Where, and Why the Server Is the One You Trust
  • One Request, Two Answers: the Same Post as an HTML Page and as JSON
  • A Blog Design from a Prompt: Downloading Figma Make Code and Reading App.tsx and BlogCard.tsx
  • How a Web Page Works: HTML Tags, Elements and Attributes
  • Semantic HTML: header, nav, main, aside and footer as Page Landmarks
  • HTML Forms: Labels, Names, Input Types and Where the Data Goes (GET vs POST)
  • CSS Basics: Selectors, Which Rule Wins, and the Box Model
  • CSS Flexbox vs Grid: A Nav Bar, a Card Row and a Dashboard
  • Responsive CSS: Viewport, Mobile-First Media Queries, clamp() and Dark Mode with Tokens
  • JavaScript for People Who Already Code: Syntax, Modules and Five Surprises
  • JavaScript Arrays the Functional Way: map, filter, reduce, find, sort and Object.entries
  • Async JavaScript: Promises, async/await, fetch and Promise.all
  • JavaScript in the Page: the DOM, querySelector and Events
  • npm, package.json and Vite: What npm install Fetches and How Vite Serves and Builds Your Page
  • TypeScript Essentials: Types Checked, Then Erased (Interfaces, Unions, Generics)
  • Why React, JSX and Components: The Page as a Function of Data
  • React Props and Composition: Data Down, Calls Up, Children in the Slot
  • Routing With React Router: One Page, Many Addresses
  • React Component Tests With Vitest and Testing Library: Test What the User Sees
  • End-to-End Tests for a React App With Playwright: A Full Dress Rehearsal
  • Why AI-Built Websites All Look the Same, and Four Levels That Fix It
  • Visual Hierarchy, Spacing and the 8-Point Grid: Tell the Eye What to Read First
  • Colour, Contrast and Dark Palettes: 60-30-10, Semantic Tokens and Ratios You Can Compute
  • Typography That Sells: Type Scale, Line Length and Free Font Pairings
  • The UI Element Catalogue: Buttons to Toasts, Their Jobs, States and shadcn/ui Names
  • Design Tokens: Primitive and Semantic Tokens, from Figma to CSS to Tailwind
  • Tailwind CSS 4 in React: Utility Classes, Responsive Prefixes, Hover and Dark Mode
  • shadcn/ui in React: Components You Own, Edit and Commit
  • Design Tokens to a Tailwind Theme: Light and Dark Mode with @theme inline
  • Motion in React: Entrance, Hover, Exit and Layout Animations
  • A React Dashboard: Stat Cards, a Recharts Line Chart and a Sortable Table
  • Accessibility in Practice: Dialogs, Menus and the Keyboard in React
  • Reference-Driven Design: Extract a DESIGN.md From a Site You Admire and Build From It
  • Components, Variants and Variables: One Design System in Figma and in CSS
  • Figma MCP Server: Build a React Component From a Frame, Then Write It Back
  • Claude Design: From a Brief to a Clickable Prototype, Then Hand It Off to Claude Code
  • Critiquing AI-Generated UI: Six Checks for Every Screen
  • The AI Design Landscape: Prompt to UI, Prompt to App, and Design to Code
  • Your Brand Rules Folder: One Folder Every AI-Built Page Follows
  • The Best-Practice UI Prompt: Plain Sentences That Beat the Average AI Page
  • UI Ideas From Figma Make, Google Stitch and ChatGPT: One Prompt, Three Designs
  • Google Stitch From a Sketch or Screenshot: Show the Layout, Say What to Keep
  • Stitch to Figma to Code: Turn a Stitch Screen Into Code That Uses Your Tokens
  • Figma Make: Prompt to Prototype With a Four-Part Prompt
  • Upgrade a Dated UI From One Screenshot (or a Reference Image)
  • States and Feedback: Make Every Click Get an Answer
  • A Design-Loop Skill: Claude Screenshots, Scores and Fixes Its Own UI
  • Copy Without the AI Tells: A Copy Pass on a Landing Page
  • Running a Next.js Admin Starter Kit: Route Groups, Theme Tokens and npm run dev
  • Remotion Basics: A Video as One Composition Object, Frames, Sequences and the Player
  • Spline: Put a 3D Scene on a Landing Page Without Writing 3D Code
  • Framer: A Launch Page Without Code, From a Free Animated Template
  • Three.js: What It Can Do on Real Sites, and How to Let Your AI Agent Use It
  • Animated Component Libraries (Magic UI, Aceternity UI): Copy-In Motion and When It Becomes Noise
  • WebGPU and Three.js Shaders in TSL: A Living Gradient, 4,500 Particles and a Hover Ripple
  • Deploy Many Vite Demos as One Static Site: A Gallery Page, One Build Command and import.meta.env.BASE_URL
  • React State, Events, Lists and Conditional Rendering: Follow One Click
  • React useEffect: When It Runs, What Cleanup Is For, and When You Don't Need One
  • Lifting State Up, Refs and React DevTools: Put State Where It Is Needed
  • Forms and Actions in React 19: Controlled Inputs, Form Actions, useActionState and useFormStatus
  • React Context and Custom Hooks: Share One Value, Reuse the Logic
  • Finishing a Remotion Video Editor: Timeline Sync, Track Order, Trims and Fades, and the Server MP4 Render
  • A 3D Product Page in React and Three.js: Scroll Becomes a Number, One Camera Shot per Panel, One Choice Drives Everything
  • A Personal 3D Portfolio Room in React Three Fiber: Hover Glow, Click to Open, Pointer Drift and a Contact Form to FastAPI
  • Server State With TanStack Query: One Key, One Request, One Cache
  • Mutations and Optimistic Updates in TanStack Query: Change Data, Then Tell the Cache
  • Generate TypeScript Types, Query Hooks and Zod From an OpenAPI Spec With Orval
  • A Mock Backend in the Browser With Mock Service Worker, Generated From the Spec
  • A React Client for a FastAPI API: The CORS Wall, CORSMiddleware and the Vite Proxy
  • Forms With React Hook Form and Zod: The API's Rules in the Browser, the Server's Errors Under the Field
  • JWT Auth in a React Client With a FastAPI Backend: Log In, Carry the Token, Let the Server Decide
  • Supabase as a Backend: Postgres, Instant APIs, Row Level Security and the Two Keys
  • Email Login With Supabase in Next.js: Three Clients, Server Actions, the Callback Route and Middleware
  • Google Sign-In With Supabase in Next.js: Which Address Goes Where
  • hCaptcha on a Supabase Login Page: Site Key in the Browser, Secret in Supabase
  1. Blog
  2. /
  3. React
  4. /
  5. Fundamentals

Animated Component Libraries (Magic UI, Aceternity UI): Copy-In Motion and When It Becomes Noise

Magic UI and Aceternity UI give you motion you copy into your project as one plain React and Tailwind file. Four of them on a sample page (marquee at 36 s, spotlight card on CSS variables, animated beam with curvature -40, text reveal with a 0.15 s delay), then the Too much page and three rules.

Chaand Sheikh

·27 November 2026·Updated 29 November 2026Fundamentals

What you will learn

  • Explain copy-in components: one file you own, built on React, Tailwind and shadcn/ui
  • Use a marquee, a spotlight card, an animated beam and a text reveal, and know the one prop that changes each mood
  • See why the spotlight card writes the pointer into CSS variables instead of React state
  • Apply three rules so motion stays premium: one moving thing per screen, slow and subtle, respect reduced motion

Before you start

  • React components and props
  • Tailwind CSS basics

Libraries like Magic UI and Aceternity UI give you ready-made motion that you copy straight into your project. We'll look at four of them, a marquee, a spotlight card, an animated beam and a text reveal, and then at the moment they turn into noise. This is a short, optional lesson about foundations. AI can generate these effects; you need to know what each one does so you can judge what it gives you.

Not a package: copy-in components

Think of it as three small steps, not something you install:

  1. Browse the gallery and pick an effect.
  2. Copy one file into your components folder.
  3. It's yours now. Plain React and Tailwind, so you can change anything.

Both libraries sit on top of Tailwind and shadcn/ui, so there's nothing new to learn twice. The sample project is React 19 with Vite, TypeScript and Tailwind CSS 4, with the four components in src/components.

1. Marquee: an endless row that pauses on hover

An endless row of logos that keeps sliding past. The sample page has two rows going in opposite directions:

<Marquee duration={36}><LogoSet /></Marquee>
<Marquee reverse duration={44}><LogoSet /></Marquee>

duration is the seconds for one full loop. The same component gives a different mood just by changing the duration or the direction: slower reads as calm. It pauses on hover (pauseOnHover is on by default) and fades at both edges with a CSS mask. With reduced motion, it renders a single static copy instead of the moving ones.

2. Spotlight card: a light that follows your pointer

Move the pointer over a card, and a soft light follows it while the border catches the glow. You wrap any content in it:

<SpotlightCard key={f.t} className="min-h-56">
  {/* icon */}
  <h3 className="font-display text-xl font-semibold text-white">{f.t}</h3>
  <p className="mt-2 leading-relaxed text-neutral-400">{f.d}</p>
</SpotlightCard>

Here's the trick, from SpotlightCard.tsx:

  // The pointer position goes straight into CSS variables: no React re-render per mouse move.
  const move = (x: number, y: number) => {
    ref.current?.style.setProperty('--x', `${x}px`)
    ref.current?.style.setProperty('--y', `${y}px`)
  }
  // ...
      onPointerMove={(e) => {
        const r = e.currentTarget.getBoundingClientRect()
        move(e.clientX - r.left, e.clientY - r.top)
      }}

The light is a radial gradient positioned at var(--x) var(--y). Because the position lives in CSS variables, React doesn't re-render on every move, and that's why it stays smooth.

State vs CSS variables for pointer tracking React state pointermove: setState re-render every move CSS variables (used here) pointermove: setProperty('--x') browser repaints the gradient no React render
Write fast-changing values straight to the element when React doesn't need them.

3. Animated beam: a light that travels between icons

Three sources on the left, one hub in the middle, three outputs on the right, and a light travelling between them. You give each beam a container, a from icon and a to icon:

<AnimatedBeam containerRef={box} fromRef={l1} toRef={hub} curvature={-40} duration={d} />
<AnimatedBeam containerRef={box} fromRef={l2} toRef={hub} duration={d} delay={0.3} />
<AnimatedBeam containerRef={box} fromRef={l3} toRef={hub} curvature={40} duration={d} delay={0.6} />

curvature={-40} bends the beam. It measures the icons on the page, so the beam follows your layout. You don't need to memorise how it's built.

4. Text reveal: words that fade in one by one

<TextReveal trigger="load" delay={0.15} text="Four small components that make an interface feel alive." />

The trigger is load, with a 0.15-second delay, then the text. It respects reduced motion too: if someone turns animation off, the text simply appears.

All four read the same small hook:

const QUERY = '(prefers-reduced-motion: reduce)'

function subscribe(cb: () => void) {
  const mql = window.matchMedia(QUERY)
  mql.addEventListener('change', cb)
  return () => mql.removeEventListener('change', cb)
}

/** true when the user asked their OS for less motion. Updates live. */
export function useReducedMotion() {
  return useSyncExternalStore(subscribe, () => window.matchMedia(QUERY).matches, () => false)
}

Everything moving is nothing noticed

The sample project has a Too much page: the same page with every component running at once. Marquees, glowing cards, beams, text fading in again and again. Where should you look? No single piece is wrong. Together, they fight for attention. Three rules:

  1. One moving thing per screen. Let one effect lead.
  2. Slow and subtle. Calm reads as premium.
  3. Respect reduced motion. Some people turn animation off.

Quick recap

ComponentWhat it doesThe knob
MarqueeEndless row, pauses on hoverduration, reverse
SpotlightCardLight follows the pointerpointer in --x/--y
AnimatedBeamLight travels between two elementscurvature, delay
TextRevealWords fade in one by onetrigger, delay

Try it yourself

Run the sample project and open the Too much page. Change the marquee duration and feel how the mood changes. Then pick one component for Orbit, the sample team project app, and leave the rest out. The project files and prompts are in the community, free to join.

Tried the exercise? Share your answer or ask a question.

The StudyEasy AI Community is free to join, with the lesson files, notebooks and code.

Join free on Skool

Keep going in React · 54 of 75

Previous
Three.js: What It Can Do on Real Sites, and How to Let Your AI Agent Use It
Next post
WebGPU and Three.js Shaders in TSL: A Living Gradient, 4,500 Particles and a Hover Ripple

Related course on Udemy

The Python Architect Masterclass: Full Stack to AI Engineer

Python, Django, FastAPI, React, Docker, AWS, LLMs, RAG, agents and MCP, from first steps to AI engineer.View on Udemy ↗: The Python Architect Masterclass: Full Stack to AI Engineer (paid course, opens in a new tab)

Related posts

Backend vs Frontend: What Runs Where, and Why the Server Is the One You Trust

Every web app has two halves. The front end runs on the user's device and is trusted with nothing; the back end holds the data, the secrets and the rules. Checked with real requests to a Django blog.

One Request, Two Answers: the Same Post as an HTML Page and as JSON

Ask a Django blog for the same post twice: once as a 12,731-byte HTML page built by a template, once as 2,976 bytes of JSON built by a serializer. Compare the headers, see who builds the page, and why the server still owns every write.

A Blog Design from a Prompt: Downloading Figma Make Code and Reading App.tsx and BlogCard.tsx

Make a blog design from a prompt in Figma Make, download src.zip, unzip it with Python's zipfile module, and read the two files that matter: App.tsx with its selectedPost state and BlogCard.tsx with its props.

How a Web Page Works: HTML Tags, Elements and Attributes

A web page is a text file full of labelled pieces. Learn tags, attributes and nesting with three tiny pages, and see what breaks when an attribute or a closing tag is wrong.

On this page

  • Not a package: copy-in components
  • 1. Marquee: an endless row that pauses on hover
  • 2. Spotlight card: a light that follows your pointer
  • 3. Animated beam: a light that travels between icons
  • 4. Text reveal: words that fade in one by one
  • Everything moving is nothing noticed
  • Quick recap
  • Try it yourself
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Related course on Udemy

The Python Architect Masterclass: Full Stack to AI Engineer

Python, Django, FastAPI, React, Docker, AWS, LLMs, RAG, agents and MCP, from first steps to AI engineer.View on Udemy ↗: The Python Architect Masterclass: Full Stack to AI Engineer (paid course, opens in a new tab)

Single logo

Empowering Education, One Course at a Time

About
About usContact us
Legal
Terms of UsePrivacy Policy

© 2026 StudyEasy Organization. All rights reserved.