Ballmac UI home

Shiny Button

A button with a diagonal band of light that sweeps across on hover and focus, or on a timer to draw the eye, built on the Ballmac button.

Installation

$ pnpm dlx shadcn@latest add @ballmac/shiny-button

Usage

import { ShinyButton } from "@/components/ballmac/shiny-button"

The full example is in the Code tab above.

Examples

On every variant

API reference

PropTypeDefault
shine

"hover" sweeps the shine on hover and keyboard focus. "loop" sweeps it again every few seconds to draw the eye.

"hover" | "loop""hover"
interval

Seconds between sweeps when `shine` is "loop".

number3.5

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Enter / SpaceActivates like any button
Reduced motionNo shine is drawn

Use with AI

<ShinyButton shine='hover|loop' interval>Label</ShinyButton>. Accepts every Button prop. No shine under reduced motion. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Shiny Button (@ballmac/shiny-button) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Primary calls to action that deserve a little life
  • Pricing and signup buttons

Not for

  • Dense toolbars
  • Destructive actions

Registry JSON: https://ui.ballmac.com/r/shiny-button.json

Credits

Free to use in personal and commercial projects.