Components
Loading preview...
The StarButton is a visually striking button that features a radial light animation with a starry background.
npx shadcn@latest add https://21st.dev/r/aghasisahakyan1/star-buttonimport { StarButton } from "@/components/ui/star-button";
import { useTheme } from "next-themes";
import { useState, useEffect } from "react";
export default function StarButtonDemo() {
const { theme } = useTheme();
const [lightColor, setLightColor] = useState("#FAFAFA");
useEffect(() => {
setLightColor(theme === "dark" ? "#FAFAFA" : "#FF2056");
}, [theme]);
return (
<div>
<StarButton lightColor={lightColor} className="rounded-3xl">
Button
</StarButton>
</div>
);
}