ComponentsButton Background Shine
Button Background Shine
ButtonBackgroundShine.tsx
export function ButtonBackgroundShine() {
return (
<button className="animate-shine items-center justify-center rounded-xl border border-neutral-800 bg-[linear-gradient(110deg,#000103,45%,#303030,55%,#000103)] bg-[length:400%_100%] px-4 py-2 text-sm font-medium text-neutral-400 transition-colors">
Button
</button>
);
}
tailwind.config.ts
{
"animation": {
"shine": "shine 6s linear infinite"
},
"keyframes": {
"shine": {
"from": {
"backgroundPosition": "0 0"
},
"to": {
"backgroundPosition": "-400% 0"
}
}
}
}