Actions & buttons / CSS
Shimmer button
A quiet sweep of light across a beautifully simple action.
Preparing the component workbench…
Actions & buttons / CSS
A quiet sweep of light across a beautifully simple action.
SOURCE / REACT · provisional
import ShimmerButton from "@/components/buildwithme/shimmer-button/react";
<ShimmerButton />// MIT · BuildWithMe-UI contributors. Original implementation.
'use client';
import { useAnimation, type AnimationProps } from './use-animation';
import './base.css';
import './shimmer-button.css';
export default function ShimmerButton({
paused = false,
label = 'Make something great',
onClick,
}: AnimationProps & { label?: string; onClick?: () => void }) {
const { ref, active } = useAnimation(paused);
return (
<div ref={ref} className="bw-demo" data-active={active}>
<button type="button" className="bw-button bw-shimmer" onClick={onClick}>
{label}
</button>
</div>
);
}
Install the registry item to receive all 7 files and their declared dependencies. Copying one file may require the other files shown here.