UIBuilder updating multiple clients

I'm new to Node-Red and UIBuilder. I'm building a kiosk system that has one page on two separate displays and I was wondering how I keep the displays synchronized. I have multiple buttons on a single page, but if I hit a button on one display, I can highlight that button on that display using Javascript, I can even send a return call to that client to run Javascript, but getting the second to show the same button as highlighted has me struggling.

Hi, thanks for using UIBUILDER.

When you send a messages to a uibuilder node, they are filtered by msg._socketId, and the clientId, tabId, pageName properties that may appear in msg._ui or msg._uib.

So if you send something that has none of those, the message will be forwarded to all connected clients.

To get an action on 1 connected client to affect all the others, send it back to Node-RED and then loop it back to the input. Removing the above details as needed (you probably want to remove both msg._uib and msg._ui properties before looping it).

Of course, you need to make sure that you don't end up with a message loop. So you might want to include the uibuilder.clientId or some other flag in the message you send back to Node-RED and include some code in the front-end process to make sure you don't re-output the change when it hits the other clients.