Getting Started
Blocks
Components
Device Mocks
Special Effects
Animations
Text Animations
Buttons
Login
Enter your credentials to access your account
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { ShineBorder } from "@/registry/magicui/shine-border";
export function ShineBorderDemo() {
return (
<Card className="relative overflow-hidden max-w-[350px] w-full">
<ShineBorder shineColor={["#A07CFE", "#FE8FB5", "#FFBE7B"]} />
<CardHeader>
<CardTitle>Login</CardTitle>
<CardDescription>
Enter your credentials to access your account
</CardDescription>
</CardHeader>
<CardContent>
<form>
<div className="grid gap-4">
<div className="grid gap-2">
<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="name@example.com" />
</div>
<div className="grid gap-2">
<Label htmlFor="password">Password</Label>
<Input id="password" type="password" />
</div>
</div>
</form>
</CardContent>
<CardFooter>
<Button className="w-full">Sign In</Button>
</CardFooter>
</Card>
);
}
Installation
pnpm dlx shadcn@latest add @magicui/shine-border
Examples
Monotone
Login
Enter your credentials to access your account
"use client";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { ShineBorder } from "@/registry/magicui/shine-border";
import { useTheme } from "next-themes";
export function ShineBorderDemo2() {
const theme = useTheme();
return (
<Card className="relative overflow-hidden">
<ShineBorder shineColor={theme.theme === "dark" ? "white" : "black"} />
<CardHeader>
<CardTitle>Login</CardTitle>
<CardDescription>
Enter your credentials to access your account
</CardDescription>
</CardHeader>
<CardContent>
<form>
<div className="grid gap-4">
<div className="grid gap-2">
<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="name@example.com" />
</div>
<div className="grid gap-2">
<Label htmlFor="password">Password</Label>
<Input id="password" type="password" />
</div>
</div>
</form>
</CardContent>
<CardFooter>
<Button className="w-full">Sign In</Button>
</CardFooter>
</Card>
);
}
Usage
import { ShineBorder } from "@/registry/magicui/shine-border";
<div className="relative h-[500px] w-full overflow-hidden">
<ShineBorder />
</div>
Props
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | The class name to be applied to the component. |
duration | number | 14 | Defines the animation duration to be applied on the shining border. |
shineColor | string | string[] | "#000000" | Color of the border, can be a single color or an array of colors. |
borderWidth | number | 1 | Width of the border in pixels. |
style | React.CSSProperties | - | Additional styles to be applied to the component. |
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