[ Actions ]

MeshButton

A standalone button lit by four soft radial colors. Pick a preset or your own colors, then control strength, reach, glow, border, radius and motion. Works in light and dark mode.

5 examplesDark modeAccessible

Import#

import { MeshButton } from 'reusify-ui';

When to use#

  • One standout action on a landing page or hero: Get started, Send, Upgrade.
  • Use it sparingly. For everyday actions, use Button.

Examples#

Playground#

Every control, shown in light and dark side by side. The code updates as you change it.

Variant
Size
Colors
<MeshButton
  variant="mesh"
  preset="holo"
  intensity={1}
  size="lg"
  rightIcon={<FiSend />}
>
  Get Started
</MeshButton>
<MeshButton rightIcon={<FiSend />}>Get Started</MeshButton>

Variants#

mesh is a bright, borderless fill with a soft inner glow, and looks the same in both themes. glow and outline sit on the theme surface, so they change with it.

<MeshButton variant="mesh" preset="sky">Get Started</MeshButton>
<MeshButton variant="glow" preset="ember">Get Started</MeshButton>
<MeshButton variant="outline" preset="sunset">Get Started</MeshButton>

Presets#

<MeshButton preset="holo" />   {/* holo · sky · mint · sunset · ocean · ember · rainbow */}

Your own colors#

colors goes left, top right, bottom right, bottom. Pass fewer and the rest come from the preset. radius makes it a rounded rectangle.

<MeshButton
  size="lg"
  radius={16}
  colors={['#F7CBBF', '#CDAFFA', '#81A9F8', '#A4FCF5']}
  rightIcon={<BsSendFill />}
>
  Send
</MeshButton>
<MeshButton variant="glow" preset="ocean" glow={0.8}>Outer glow</MeshButton>

Animation#

Off by default. Add animate to any variant: on its own it means flow, or name a mode. speed sets the seconds per loop.

flowborderpulseshimmer
flowborderpulseshimmer
<MeshButton animate>Flow</MeshButton>
<MeshButton variant="outline" animate="border">Border</MeshButton>
<MeshButton variant="glow" animate="pulse">Pulse</MeshButton>
<MeshButton animate="shimmer" speed={2}>Shimmer</MeshButton>

API reference#

<MeshButton />

Also accepts every native <button> attribute, or <a> attributes when href is set. Forwards its ref.

variant'mesh'
'mesh' | 'glow' | 'outline'

Bright fill, colored light on the surface, or a gradient border.

preset'holo'
'holo' | 'sky' | 'mint' | 'sunset' | 'ocean' | 'ember' | 'rainbow'

Starting palette. Also exported as meshPresets.

colors-
string[]

Up to four colors: left, top right, bottom right, bottom.

intensity1 / 0.7 / 0.14
number (0–1)

Color strength, by variant.

spread1
number

How far each color reaches.

glow0
number (0–1)

Soft light around the button.

highlightfalse
boolean

Bright spot along the bottom edge.

borderWidth0 / 1 / 1.5
number | string

Border thickness, by variant. 0 removes it.

radius9999px
number | string

Corner radius.

textColor-
CSS color

Label and icon color.

animatefalse
boolean | 'flow' | 'border' | 'pulse' | 'shimmer'

Works on every variant. true means flow. Off under reduced motion.

speed8 / 3 / 2.4 / 2.8
number

Seconds per loop, by animate mode.

size'md'
'sm' | 'md' | 'lg'

Height and text size.

fullWidth / iconOnlyfalse
boolean

Stretch, or a square icon button (give it an aria-label).

loading / disabledfalse
boolean

Shows a spinner / blocks interaction.

leftIcon / rightIcon-
ReactNode

Icons beside the label.

href-
string

Renders a link that looks like the button.

Accessibility#

  • Renders a real <button> or <a> with a visible focus ring.
  • mesh keeps a dark label over a bright fill. With your own colors, check the label contrast, and use textColor if needed.
  • animate stops under prefers-reduced-motion.