Skip to main content

Link Card

Pro Feature

This is an exclusive feature of DASH Pro. Check it out here.

Text Input Card Preview

Link card is particularly useful when you want to redirect user to a new page. This card accepts valid URL schemes as string which will be passed on to dashboard for user action.

Initializer

/* 
Link Card
Valid Arguments: (ESPDash dashboard, Card Type, const char* name)
*/
Card linkcard(&dashboard, LINK_CARD, "Test Link");

Callback

note

Link card doesn't require any callback.

Updater

After initialization, you will have to provide the URL which has to be opened when user clicks on the card. You can do this by calling the update function.

linkcard.update(const char* url);

Reference

This is a reference sketch showing positions for intializer and updater.


...

/* Link card initializer */
Card linkcard(&dashboard, LINK_CARD, "Test Link");


void setup() {
...

/* Link card updater - can be used anywhere (apart from global scope) */
linkcard.update("https://espdash.pro");
}

void loop() {
...
}