Dashboards & Visualizations

Is it possible to toggle dashboard theme at runtime by user input field?

chiliconbeano
Path Finder

Is it possible to allow users the interactive capability of selecting between light and dark mode theme by way of an input field?  I tried:

<form theme="$background_theme_token$>

along with an input field for that token ( light or dark selection ) and was not able to get it to work.

Any suggestions or is this not doable in the Classic dashboard (XML) world?

Thanks in advance,

Bob

Labels (1)
0 Karma
1 Solution

VatsalJagani
SplunkTrust
SplunkTrust

@chiliconbeano - It is not possible with just simple XML and tokens.

But as per the document of Simple XML dashboards, you can set the URL to:

<dashboard_url>?theme=dark

 with JavaScript to achieve the same.

Note that this will not be changed to dashboard XML, it will just show the user a different theme. But enough for what you want to achieve.

 

I hope this helps!!!

View solution in original post

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@chiliconbeano - It is not possible with just simple XML and tokens.

But as per the document of Simple XML dashboards, you can set the URL to:

<dashboard_url>?theme=dark

 with JavaScript to achieve the same.

Note that this will not be changed to dashboard XML, it will just show the user a different theme. But enough for what you want to achieve.

 

I hope this helps!!!

0 Karma

chiliconbeano
Path Finder

VatsalJagani,

Awesome solution...thanks a million!

Bob

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...