Link Card

This feature is only available in ESP-DASH Pro

The Link Card enables user redirection through clickable URL links on the dashboard.
Initializer
To create a link card in ESP-DASH v5, use the dash::LinkCard
class.
dash::LinkCard link(dashboard, "Test Link");
Methods
setValue(const char* url)
Set the URL to open when the card is clicked.
link.setValue("https://espdash.pro");
- Signature:
void setValue(const char* url)
- Parameters:
const char* url
— The URL to open.
- Returns:
void
value()
Get the current URL value.
const char* url = link.value();
- Signature:
const char* value()
- Parameters: None
- Returns:
const char*
— The current URL value.
Reference
A complete example showing how to use the Link Card in a real project. This demonstrates initialization, setting the URL, and updating it dynamically.
dash::LinkCard link(dashboard, "Test Link");
void setup() {
// ...
// Set URL for the link
link.setValue("https://espdash.pro");
}
void loop() {
// ...
}
Last updated on