← All components
Interaction / component

Specular Button

A native button with an optical edge that responds to proximity, focus and activation.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Preserves the complete optical edge shader, size, tint and proximity response. The complete Demo adds a real click counter and accepts the same children label.
  • Native button props, callbacks, form attributes and disabled semantics remain available. Focus lights the edge; pointer proximity is optional.
  • Rendering caps DPR at 1.5. Idle, paused, hidden, offscreen and reduced-motion states schedule no continuous frames; a CSS edge remains usable without graphics.
React 19.2Modern browsersWebGL

React Bits — David Haz · MIT + Commons Clause. Reuse explicitly authorized; see bundled exact notice.

Props

PropTypeDefaultDescription
size'sm' | 'md' | 'lg'"lg"Size; accepted ranges and choices are shown in the controls.
radiusnumber18Radius; accepted ranges and choices are shown in the controls.
tintstring"#ffffff"Tint; accepted ranges and choices are shown in the controls.
tintOpacitynumber0Tint opacity; accepted ranges and choices are shown in the controls.
blurnumber0Blur; accepted ranges and choices are shown in the controls.
textColorstring"#f5f5f5"Text color; accepted ranges and choices are shown in the controls.
lineColorstring"#ffffff"Edge color; accepted ranges and choices are shown in the controls.
baseColorstring"#525252"Base color; accepted ranges and choices are shown in the controls.
intensitynumber1Intensity; accepted ranges and choices are shown in the controls.
shineSizenumber10Shine size; accepted ranges and choices are shown in the controls.
shineFadenumber40Shine fade; accepted ranges and choices are shown in the controls.
thicknessnumber1Thickness; accepted ranges and choices are shown in the controls.
speednumber0.35Speed; accepted ranges and choices are shown in the controls.
followMousebooleantrueFollow pointer; accepted ranges and choices are shown in the controls.
proximitynumber250Proximity; accepted ranges and choices are shown in the controls.
autoAnimatebooleanfalseOrbit automatically; accepted ranges and choices are shown in the controls.
disabledbooleanfalseDisabled; accepted ranges and choices are shown in the controls.
childrenReactNode'Get Started'Accessible button label or caller content.
onClickMouseEventHandler<HTMLButtonElement>undefinedReceives real native activation events.
type'button' | 'submit' | 'reset''button'Native button form behavior.
pausedbooleanfalseStops decorative motion while preserving useful content and interaction.
replayTokennumber0Change to restart decorative phase without remounting content; static prints and agent activity retain their state.
classNamestring''Additional scoped host class.
styleCSSPropertiesundefinedInline host styles; caller owns container layout.