Exporting dash app layout to the html

the task requires saving the Plotly dash Dashboard in HTML format. I’ve designed the dashboard with the callbacks and made it interactive. while searching for ways to save the dashboard I found this one


but this doesn’t save the current state of the dashboard this just saves the initial state of the dashboard. Is there any other way I can do the same?

there are some different options for exporting the figures to the HTML but there is no option for exporting whole app layout to HTML


That’s an interesting question/feature! I guess the gist you shared gets the initial state because the current components in the layout are rendered by React…

One thing you could try is to pass the children of the outermost component of the layout as State (which will be a nested dict/list with all component in the layout), save it as json and find the right place to inject it back in html.

Please let us know if this works, it can be useful in some use cases I have. Thanks!

What I have managed to do is to have a static figure which will be loaded at the starting of the graph ( the one with the default parameters) after loading it the whole dashboard get’s saved with code from github gist.

And again I can still make a use of callbacks for interactiveness of the graph.

the problem with this default method is my dashboard became slightly slower ( cause it has to load same graph twice ig ) ```