Skip to content
VenusUI
Get started

Shimmer Button

A primary button with a light sweep across its surface.

Preview

Installation

npx shadcn@latest add @venusui/shimmer-button

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/shimmer-button.tsx

Usage

The code behind the preview above.

shimmer-button-demo.tsx

import { ArrowRight } from "lucide-react"

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

export default function ShimmerButtonDemo() {
  return (
    <ShimmerButton>
      Get started
      <ArrowRight />
    </ShimmerButton>
  )
}

API reference

PropTypeDefaultDescription
type"button" | "submit" | "reset""button"Defaults to button so it never submits a form by accident. Pass type="submit" inside forms.

All <button> props, including className, disabled, onClick and ref.

Requirements

  • Tailwind CSS v4. The CLI adds the shimmer keyframes and the --animate-shimmer theme variable to your CSS.
  • A cn helper at @/lib/utils.

Customization

  • Change the speed by editing --animate-shimmer in your CSS, e.g. shimmer 4s linear infinite.
  • Colors come from your theme’s --primary and --primary-foreground. Change those, or override with className.
  • Icons inside the button are sized to 16px unless they have their own size-* class.

Accessibility

  • The light sweep stops when the user prefers reduced motion.
  • It renders a native <button>, so keyboard and screen reader support work as usual. Give icon-only buttons an aria-label.

Troubleshooting

The button is flat, with no light sweep.
Your CSS is missing the shimmer keyframes or --animate-shimmer. The CLI adds them; after a manual install, copy the CSS from the Manual tab.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

A button with a light that keeps circling its border.

Loading preview

A heart toggle that pops and bursts when liked, with an optional count.

Loading preview

A button that sends a ripple out from where it was pressed.