You have to create a folder in your app,
appname/appserver/static, and place the files there.
Then you edit the Simple XML of your dashboard so that the dashboard includes a reference to these files, i.e.
<dashboard script="code.js" stylesheet="styles.css">
As with all newly created files, splunk only picks them up at a start, so you'll have to restart your splunk after you put your files into
appserver/static before you can make use of them in XML.
After that, the usual procedure is to add a div in a html tag which you grab in js and do everything after that there.
Please check good answer on splunkbase:
The best way to explain how to do this is show you my own example of what @kamlesh_vaghela was suggesting.
Here is a repo for my own app with custom JS/CSS components: https://github.com/thibodux/developer_gadgets
if you look under
appserver/static/components you will see some of my custom JS classes/modules. You need to put the JS and CSS files for the menu in this kind of folder structure. Then you need to create another JS file that sits in
appserver/static that will initialize and pull in the components. @kamleshvaghela referred to this as code.js, and in my app repo it is called
load.js (https://github.com/thibodux/developergadgets/blob/master/appserver/static/load.js). It doesn't matter what you name the file.
The primary requirement for your dashboard is that it must include this top-level JS file in the
form XML element like @kamlesh_vaghela showed with
<dashboard script="code.js" ...>. You can look at the XML files in my app repo to see how I do the same thing.
Now, I am not making any guarantees that this will actually work with the menu library you want. But this is the approach you use to incorporate such custom things in a Splunk app/xml dashboard.