Skip to content
Thrum

Shimmer button

A primary button with a band of light that sweeps across it once when it is hovered or focused by keyboard. Use it for the one action a page wants noticed, such as an upgrade. Everywhere else use the button: two of these on one screen cancel each other out.

Install

npx shadcn@latest add @thrum-pro/shimmer-button

This is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.

Props

PropTypeDefaultDescription
size"sm" | "md" | "lg"Default "md"sm is 28 pixels tall, md 32, lg 40.
loopbooleanDefault falseKeep the sheen sweeping, once every 2.8 seconds, instead of once per hover or focus.
pausedbooleanDefault falseFreeze the sheen where it is, and start no new sweep.
disabledbooleanDefault falseThe native attribute. A disabled button does not sweep, with or without loop.
type"button" | "submit" | "reset"Default "button"The native type. Set submit inside a form.
classNamestring–Extra classes, merged last.
...propsComponentProps<"button">–Every other button attribute and event handler is passed through.

Motion and sound

Motion

  • On hover, and on keyboard focus, a band of light half as wide as the button crosses it from left to right in 700 ms. A sweep that is running is left to finish before another starts.
  • The band is the primary text colour at up to 25%, so it shows on any theme: a light sweep on a dark primary colour, a shade on a light one.
  • With loop it sweeps for 700 ms, rests for 2.1 seconds, and repeats. paused freezes it where it is.
  • The sweep runs through the browser's Web Animations API. It needs no keyframes in your stylesheet and adds no style element, so a strict content security policy allows it.
  • Hover and press also change the colour and scale the button to 97%, over 150 ms, as on the button.
  • Reduced motion: there is no sweep, with or without loop. A disabled button does not sweep either.

Sound

Silent. This component makes no sound.

Accessibility

  • It is a native button, named by its text. The sheen is hidden from screen readers and takes no pointer events.
  • The sheen passes behind the label, at no more than a quarter of the label colour's strength, and is gone in under a second.
  • A loop keeps moving for as long as the page is open, which draws the eye away from reading. Leave it off unless the page is about that one action, and offer paused where it runs longer than 5 seconds.
  • At rest, and under reduced motion, a static diagonal sheen marks the button without moving.
KeysAction
TabFocus the button. The sheen sweeps once.
Enter / SpacePress the button.

Source

SourcePro

The source comes with Pro

TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies

Files and dependencies

Adds
components/ui/shimmer-button.tsx
Packages
motion
Brings along
ButtonMotion tokens

Changelog

  1. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor