Getting Started
Components
Device Mocks
Special Effects
Animations
Text Animations
Buttons
Magic UI.
UI library for Design Engineers
-> 20+ free and open-source animated components built withReact,Typescript,Tailwind CSS, andMotion.
-> 100% open-source, and customizable.
import { Button } from "@/components/ui/button";
import { BoxReveal } from "@/registry/magicui/box-reveal";
export function BoxRevealDemo() {
return (
<div className="size-full max-w-lg items-center justify-center overflow-hidden pt-8">
<BoxReveal boxColor={"#5046e6"} duration={0.5}>
<p className="text-[3.5rem] font-semibold">
Magic UI<span className="text-[#5046e6]">.</span>
</p>
</BoxReveal>
<BoxReveal boxColor={"#5046e6"} duration={0.5}>
<h2 className="mt-[.5rem] text-[1rem]">
UI library for{" "}
<span className="text-[#5046e6]">Design Engineers</span>
</h2>
</BoxReveal>
<BoxReveal boxColor={"#5046e6"} duration={0.5}>
<div className="mt-6">
<p>
-> 20+ free and open-source animated components built with
<span className="font-semibold text-[#5046e6]">React</span>,
<span className="font-semibold text-[#5046e6]">Typescript</span>,
<span className="font-semibold text-[#5046e6]">Tailwind CSS</span>,
and
<span className="font-semibold text-[#5046e6]">Motion</span>
. <br />
-> 100% open-source, and customizable. <br />
</p>
</div>
</BoxReveal>
<BoxReveal boxColor={"#5046e6"} duration={0.5}>
<Button className="mt-[1.6rem] bg-[#5046e6]">Explore</Button>
</BoxReveal>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @magicui/box-reveal
Usage
import { BoxReveal } from "@/components/magicui/box-reveal";
<BoxReveal>Box Reveal</BoxReveal>
Props
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | The class name to be applied to the component |
boxColor | string | #5046e6 | Color of the box overlaying the text |
duration | number | 0.5 | Durations (seconds) of the animation |
Limited Time Offer
Ship Faster with Magic UI ProMagic UI Pro
Stop building from scratch.
Get 8 production-ready templates and 50+ premium components that your users will love.
✓
Next.js 15 + TypeScript ready✓
Copy, paste, customize in minutes✓
Save 100+ hours of development