Spider Button

Spider Button is a button in the UI HUB buttons collection. A WebGL1 lacquered pill button. A signed-distance field for the rounded pill is converted to a height field (z = sqrt(max(1e-3, s * (2B - s)))) so normals come from finite differences; shading is a procedural env map (rim band, top sheen, two side reflections) scaled by fresnel, plus two sharp specular glints and an of…

The component is driven by 42 documented props (background, suitColor, webColor, cobwebs, textColor, font and 36 more), so colours, intensity, timing and density can be tuned from the call site instead of being hard-coded.

Implementation notes: WebGL1 fragment shader (SDF pill); Canvas 2D overlay; requestAnimationFrame loop.

Preview the button in the browser above, copy the source, and paste it into your project. Buttons components in UI HUB are grouped by category so you can compare effects side by side before choosing one.

What is Spider Button?

A lacquered red pill button strung with spider-web strands that sense a drawn glove, lunge to grab it, splat webbing across it and snap back under gravity.

Spider Button at a glance

Category
Buttons
Pricing
Free to use
Libraries
React
Language
TypeScript
Styling
Tailwind CSS
Configurable props
42
AI prompts
Ready for Advance, Antigravity, Claude Code, Cursor, Lovable

How Spider Button works

A WebGL1 lacquered pill button. A signed-distance field for the rounded pill is converted to a height field (z = sqrt(max(1e-3, s * (2B - s)))) so normals come from finite differences; shading is a procedural env map (rim band, top sheen, two side reflections) scaled by fresnel, plus two sharp specular glints and an offset soft shadow suppressed on dark backgrounds. Up to 7 main strands are 12-point Verlet chains rooted on the pill perimeter and tip-pinned to eight grip points on a drawn glove (or arrow, or the OS cursor), solved with 14 relaxation iterations plus 2 smoothing passes, cycling idle -> seek -> grow -> hold -> snap with gravity 65. A Canvas 2D overlay draws the cobweb border and thread rings, four procedural cobwebs (one draped), flickering sense lines, the strand web with cross-links, a webbing splat that creeps over each caught grip, and the hand with its cuff and seam lines.

Technical information for Spider Button

Category Buttons
Libraries React
Styling Tailwind CSS
Language TypeScript
Rendering WebGL shaders, HTML canvas
State change idle red pill wrapped in cobwebs and thread, ghost hand approaching to strands lunged out, webbing splatted across the glove, violent snap-back under gravity
Props 42 configurable
Usage example Included on this page

What Spider Button requires

  • WebGL1 fragment shader (SDF pill)
  • Canvas 2D overlay
  • requestAnimationFrame loop
  • Verlet strand simulation with relaxation
  • ResizeObserver
  • pointer and keyboard event handling
  • prefers-reduced-motion support
  • devicePixelRatio cap of 2
  • WebGL failure fallback pill

How to use Spider Button

  1. Install React if your project does not already use it.
  2. Copy the usage example from the Source section of this page. It shows the import path and the props the component expects.
  3. Render <SpiderButton /> in your page using that import path.
  4. Pass any of the 42 documented props to change colours, density, speed or behaviour.

Spider Button questions

What is Spider Button?

A lacquered red pill button strung with spider-web strands that sense a drawn glove, lunge to grab it, splat webbing across it and snap back under gravity.

How does Spider Button work?

A WebGL1 lacquered pill button. A signed-distance field for the rounded pill is converted to a height field (z = sqrt(max(1e-3, s * (2B - s)))) so normals come from finite differences; shading is a procedural env map (rim band, top sheen, two side reflections) scaled by fresnel, plus two sharp specular glints and an offset soft shadow suppressed on dark backgrounds. Up to 7 main strands are 12-point Verlet chains rooted on the pill perimeter and tip-pinned to eight grip points on a drawn glove (or arrow, or the OS cursor), solved with 14 relaxation iterations plus 2 smoothing passes, cycling idle -> seek -> grow -> hold -> snap with gravity 65. A Canvas 2D overlay draws the cobweb border and thread rings, four procedural cobwebs (one draped), flickering sense lines, the strand web with cross-links, a webbing splat that creeps over each caught grip, and the hand with its cuff and seam lines.

Which category does Spider Button belong to?

Spider Button is listed under Buttons in the UI HUB catalog. Call-to-action buttons with real interaction design: magnetic pull on hover, glow and shimmer sweeps, press states and SVG-based shape morphs. Each button accepts its own label, href and colour props, so it drops into an existing layout without forcing a wrapper. Accessible focus states are preserved in every variant.

What does the background prop do in Spider Button?

Stage background behind the pill; also decides whether the GL drop-shadow is drawn. It defaults to "#000000".

What does the suitColor prop do in Spider Button?

Base lacquered red of the pill body and its fallback gradient. It defaults to "#C8121C".

Is Spider Button free to use?

Spider Button is a free component on UI HUB. You can preview it in the browser and read the full props table on the component page.

Which libraries does Spider Button use?

Spider Button uses React and is styled with Tailwind CSS.

What does Spider Button need to run?

Spider Button needs WebGL1 fragment shader (SDF pill), Canvas 2D overlay, requestAnimationFrame loop and Verlet strand simulation with relaxation.