Skip to content

Magic UI Grid Notes

Over 150 animated landing-page components — marquees, Bento grids, shimmer buttons, globes and device mocks — built with React, Tailwind CSS and Motion.

Grid NotesVersion registryUI librariesChecked 2026-11-04
Setup & agent config

Install and prerequisites

What your agent should install or configure before writing code with this pack.
Terminal
npx shadcn@latest add @magicui/marquee
Packages:@magicuimotion

Requires shadcn/ui initialized (npx shadcn@latest init), Tailwind CSS and motion.

Framework setup

Production-ready wiring for React 19, Next.js App Router and Tailwind CSS v4.

Accessible marquee with pause-on-hover and reduced-motion gate

Pair @magicui/marquee with pauseOnHover, a visible pause toggle for WCAG 2.2.2, and motion-reduce:[animation-play-state:paused].

components/logo-marquee.tsx
"use client";

import { useState } from "react";
import { Marquee } from "@/components/ui/marquee";

export function LogoMarquee({ items }: { items: { id: string; name: string }[] }) {
  const [paused, setPaused] = useState(false);

  return (
    <section aria-label="Supported tools">
      <div className="flex justify-end pb-2">
        <button type="button" onClick={() => setPaused((p) => !p)} className="text-xs underline">
          {paused ? "Play marquee" : "Pause marquee"}
        </button>
      </div>
      <Marquee pauseOnHover className={paused ? "[&_div]:[animation-play-state:paused]" : ""}>
        {items.map((item) => (
          <span key={item.id} className="px-4 py-2 text-sm">
            {item.name}
          </span>
        ))}
      </Marquee>
    </section>
  );
}

Gotchas for agents

Real-world traps — version mismatches, licence boundaries, main-thread stalls and CSS layer rules — that trip AI agents up.
  1. Tailwind v4 keyframe definitions

    Several Magic UI components (marquee, shimmer-button, border-beam, shine-border) expect custom --animate-* and @keyframes rules. In Tailwind v4, declare those inside @theme inline { ... } in globals.css rather than tailwind.config.js.

  2. Duplicate children in Marquee clones

    Marquee renders multiple copies of children to fill the track. Mark cloned copies aria-hidden="true" and take interactive links inside clones out of the Tab order (tabIndex={-1}) so keyboard users don't tab through the same list four times.

  3. Check motion imports after install

    Older registry items may still import from framer-motion; update those imports to motion/react so your project bundles a single copy of Motion.

Accessibility and reduced motion

How to keep animations and interactive components accessible across keyboard, screen readers and prefers-reduced-motion.

Reduced motion

Add motion-reduce:[animation-play-state:paused] to continuous animations (marquee, orbiting-circles, border-beam) and provide a visible pause control for any marquee on the page.

Keyboard and screen readers

Ensure only the first repetition in a marquee or ticker is exposed to screen readers and keyboard Tab navigation.