Skip to Content
zjkm-ui
Components

Glow Button

A button with a gradient glow that follows the cursor.

Props
<GlowButton>
  Deploy
</GlowButton>

Installation

npx shadcn@latest add https://ui.zjkm.tech/r/glow-button.json
import { GlowButton } from "@/components/glow-button"

Using JavaScript? Set tsx: false in components.json and the CLI converts it.

New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.

Usage

A dark button with a soft glow that sits under the cursor while you hover, and around the button when it has keyboard focus.

import { GlowButton } from "@/components/glow-button";

export function DeployButton() {
  return <GlowButton glowColor="#8b5cf6">Deploy</GlowButton>;
}

Props

PropTypeDefaultDescription
childrenReactNodeThe label.
glowColorstring"#8b5cf6"Colour of the glow.
...propsbutton propsEvery native <button> prop: onClick, disabled, type and so on.

The glow only follows the cursor, so reduced motion changes nothing.

On this page