Widgets / directory

Button

BUTTON

Momentary or toggle actuator for a single virtual or hardware pin.

At a glance

Default2 x 2
Minimum1 x 1
Resizeboth
Pinrequired
Interactiveyes

Behavior

  • Supports optimistic UI updates in running mode.
  • Can behave as push, switch or styled surface depending on config.
  • Works best for relays, pumps, lights and macro triggers.

Firmware contract

Use BLYNK_WRITE(Vx) and drive a relay, MOSFET or scene flag.

On the app side this widget snaps to the 8-column square grid and uses both resizing. Its raw type is BUTTON and the matching icon token in the app is circle.

Pin support: Usually virtual pins V0-V127; can also target digital pins when the project uses direct digital writes.

Transmission: Writes a single scalar value. In push mode it sends press/release states; in switch mode it keeps the toggled state.

Canvas preview

docs.widget.preview
Button
stable
STATUS

Widget contract

PropertyValue
Raw typeBUTTON
Default size2 x 2
Minimum size1 x 1
Resize modeboth
Pin requirementrequired
Pin supportUsually virtual pins V0-V127; can also target digital pins when the project uses direct digital writes.
Interactiveyes
TransmissionWrites a single scalar value. In push mode it sends press/release states; in switch mode it keeps the toggled state.

Allowed pin families

Usually virtual pins V0-V127; can also target digital pins when the project uses direct digital writes.

Transport path

Writes a single scalar value. In push mode it sends press/release states; in switch mode it keeps the toggled state.

Operational limits

Best used with one target pin only

Configuration surface

  • pushMode chooses momentary vs toggle semantics
  • onLabel/offLabel control visible state naming
  • color and themed border affect affordance more than layout

Limits and caveats

  • Best used with one target pin only
  • Rapid repeated taps still depend on board-side debounce for real relays

Firmware example

A minimal pattern that matches how this widget usually talks to the board.

button.ino
BLYNK_WRITE(V0) {  int value = param.asInt();  digitalWrite(RELAY_PIN, value);}

Layout notes

Canvas footprint

2 x 2

Default footprint in the Plynx canvas before user resizing.

Resize floor

1 x 1

The minimum size accepted by the app during drag-resize.

Interaction model

Live input

Whether the user edits state directly or only reads it.

Related widgets