Skip to content
Academy · Guides

An Arrmma component is a piece of interface with its code: you copy it into your project, mount it and replace the sample content.

By Arrmma editorial team · Published · 30 min (approximate) · Level: Intermediate

Tested on November 16, 2026 with Mouse Trail 1.0.1 in a new Vite 8.3.6 and React 19.3.1 project, with GSAP 3.15.1, Node.js 24.22.1 and npm 11.19 on macOS.

Short answer

To integrate an Arrmma React component: try its demo first (npm ci and npm run build), copy the .jsx, its .css, the fonts folder and content.js together into a folder under src/, copy the images to public/assets/, install gsap, import the component and mount it. Then review your project’s global styles: in our test, the Vite template’s h1 rule and fixed #root width altered the component, and two CSS rules fixed it.

What you need

  • A working React 19 project (we created one with npm create vite@latest).
  • The component package. Mouse Trail downloads free with an account.
  • Node.js 20.19 or later (or 22.12+) and npm.
  • Optional: an AI tool to do the copying and mounting from prompt.md.

Files and dependencies

  • src/MouseTrail.jsx: the component (imports gsap and its CSS).
  • src/mouse-trail.css: styles and the Inter Tight @font-face.
  • src/fonts/: the Inter Tight typeface (OFL licence included).
  • src/content.js: sample title and images.
  • public/assets/: twelve demo images.
  • Dependencies: react 19 (already in your project) and gsap ^3.15.0.

What Arrmma provides and what your AI tool does

Arrmma provides

  • The finished component, with its measurements, animations, touch behaviour and reduced-motion handling.
  • A README with the measurement table and integration steps, and a prompt for your tool.

Your AI tool does

  • Copying the files to the right place in your project, installing gsap and mounting the component.
  • Spotting global rules in your project that clash. Verify it yourself at 1440 and 390 px.

Steps

  1. Try the demo as it is

    Inside the package folder, install and build. That demo is your visual reference.

    cd mouse-trail
    npm ci
    npm run build

    Check: The build finishes without errors.

  2. Copy the files into your project

    The component, its CSS, the fonts and the content go together in the same folder under src/. Images go to public/assets/.

    mkdir -p src/mouse-trail public/assets
    cp ../mouse-trail/src/MouseTrail.jsx ../mouse-trail/src/mouse-trail.css \
       ../mouse-trail/src/content.js src/mouse-trail/
    cp -R ../mouse-trail/src/fonts src/mouse-trail/
    cp ../mouse-trail/public/assets/* public/assets/

    Check: src/mouse-trail/ contains MouseTrail.jsx, mouse-trail.css, content.js and fonts/.

  3. Install GSAP

    It is the only dependency the component adds to a React 19 project.

    npm install gsap@^3.15.0

    Check: package.json includes gsap (3.15.1 was installed in our test).

  4. Mount the component

    Import it wherever you want to show it, just like the demo’s main.jsx.

    import {MouseTrail} from './mouse-trail/MouseTrail'
    import {title, images} from './mouse-trail/content'
    
    <MouseTrail title={title} images={images} />

    Check: npm run build compiles and the page shows the black block with the title.

  5. Review your project’s global styles

    The component title is an h1 and inherits color and typeface from its container. If your project sets global h1 rules, they beat that inheritance; and if your container has a fixed width, the component is boxed in. Both happened with the Vite template, and we fixed them in the project CSS without touching the component files.

    /* your project’s src/index.css */
    .mt-title { color: inherit; font-family: inherit; }
    .mt { width: 100vw; margin-left: calc(50% - 50vw); text-align: initial; }

    Check: The title shows in white and soft green and the block spans the full width.

  6. Check nothing else changed

    Move the pointer across the block and check the console. Compare a heading and a button on your page before and after.

    Check: No errors or 404 files; in our test, the project’s h1 and button kept their font, size, color and margins.

  7. Replace the content

    Change the title and paths in content.js to your own and replace the images in public/assets/ with your own or licensed square photos. If the component lives on a route other than the root, write paths as /assets/… or with import.meta.env.BASE_URL.

    Check: The trail shows your images at 1440 and 390 px.

What happened in our test

We created a new project with npm create vite@latest (React template): Vite 8.3.6 and React 19.3.1. The package demo built without errors before we copied anything.

After copying the files, installing gsap and mounting the component, the build passed, but the result was not the demo: the first title line was almost black on black and the block measured 1126 px instead of the full width. Two rules in the Vite template (h1 and #root) caused it.

With the two rules from step 5 the component matched the demo at 1440 and 390 px, with no console errors or 404 files. The project’s h1 stayed at 56 px with its font and color, and the button did not change.

New Vite and React project before integrating the component
Starting project
The component right after mounting: the first title line turns dark and the block does not span the full width
A real conflict with the project styles
Mouse Trail integrated: white and soft-green title and a trail of images behind the cursor at full width
Integrated · 1440 px
Mouse Trail integrated at a mobile width
Integrated · mobile

Visual demo versus real services

Works in the design

  • The full effect works in the browser with its own files.
  • Images and title are samples (images generated with AI for Arrmma).

You connect or contract it separately

  • It uses no API, keys or environment variables: there are no services to connect.
  • The rest of your site (routes, forms, data, hosting) remains yours.

Common mistakes and how to fix them

  • Copying only the .jsx: without mouse-trail.css and the fonts/ folder the component loses its styles and typeface. Copy them together.
  • Not installing gsap: the build fails to resolve the import. Run npm install gsap.
  • Global h1 rules or a fixed-width container: the title changes color or the block is boxed in. Apply the two rules from step 5 or mount it outside the container.
  • Relative image paths on a route other than the root: they return 404. Use /assets/… or import.meta.env.BASE_URL.
  • Replacing it with a carousel or changing durations “to simplify”: it stops being the design you chose.

Templates for this kind of project

Design used in this guide: See Mouse Trail (free with an account)

Find your next design.

Get Arrmma updates.