Shimmer Button

A button with an animated shimmer effect that respects prefers-reduced-motion.

التثبيت

tsx
npx fasla-ui add shimmer-button

معاينة

Custom Colors

الاستخدام

tsx
import { ShimmerButton } from "@/components/ui/shimmer-button"

export function Example() {
  return (
    <ShimmerButton
      shimmerColor="rgba(255, 255, 255, 0.3)"
      background="linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
    >
      Get Started
    </ShimmerButton>
  )
}

الخصائص

PropTypeDefaultDescription
shimmerColorstringhsl(var(--primary) / 0.2)Color of the shimmer effect
shimmerDurationstring2sDuration of shimmer animation
backgroundstringhsl(var(--primary))Background color or gradient
borderRadiusstring0.5remBorder radius of the button

الوصولية

The shimmer animation automatically respects the user's prefers-reduced-motion setting. When reduced motion is preferred, the shimmer effect is disabled while maintaining the button's visual appearance.