Baktiyar Ablaikhan

Rainbow Button

Source
Magic UI ↗
Author
Magic UI
Licence
MIT

Loading…

A dark button with a moving rainbow edge and glow beneath it.

Code

"use client";

import { RainbowButton } from "@/lab/magicui/ui/rainbow-button";

export default function RainbowButtonDemo() {
  return (
    <div className="relative flex h-full w-full items-center justify-center">
      <RainbowButton>Get Unlimited Access</RainbowButton>
    </div>
  );
}
Prompt

Build "Rainbow Button", a button animation. What it does: A dark button with a moving rainbow edge and glow beneath it. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS. It sits on a light background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://magicui.design/docs/components/rainbow-button (Magic UI, MIT).