Testing Totally Information's web-components - button-send

Beta: Ready for basic use. Documentation. Component Version: --.

A dynamic button that triggers an event with standardised meta-data on-click. It also allows more complex content than the standard HTML button tag.

If UIBUILDER for Node-RED is in use, clicking will automatically send a message back to the Node-RED server.

The detail data sent on the click event mirrors that for UIBUILDER output. Create an event listener in JavaScript to pick up the data. See the source code of this page for examples.

Basic Usage

This is a basic button Send out a message.

Use topic, payload and data-* attributes to pass to the custom event.

Note that you can't normally include block tags (e.g. <br>, <p>, etc) in a <button> but you can now!

console.log output