Is there a way to save React template as a standalone HTML?

The reason is I want to readjust sizing of the plot and move stuff around without needing a server.

import panel as pn
import xarray as xr
import hvplot.xarray

ds = xr.tutorial.open_dataset('air_temperature')
plot = ds.hvplot('lon', 'lat')
plot_pn = pn.pane.HoloViews(plot)

react = pn.template.ReactTemplate(title='Test')
react.sidebar.append(plot_pn[0])
react.main[:, :] = pn.Card(plot_pn[1], sizing_mode='scale_both')
react.save('test.html')

I am also trying to save a React template as a standalone HTML, but the react.save(‘test.html’) is returning “AttributeError: ‘ReactTemplate’ object has no attribute ‘get_root’”

Can templates be saved as standalone HTML, and if so, how to get around the no attribute "get_root’?

Thanks

@rcravotta If you upgrade to Panel 0.12.0 you should be able to save templates no problem.

Thank you for the quick reply. I am using Anaconda Navigator’s to load the highest version of panel at 0.11.3. Is there a trick to loading 0.12.0 or do I wait until Navigator updates to it?

I’ll try to make sure it’s updated in Anaconda defaults asap and try to remember to ping you when that’s done. Not too familiar with navigator myself but if you can update from the commandline the new package is available with:

conda install -c pyviz panel=0.12.0

I was able to test panel 0.12.0 via Navigator update today. I am able to save the template as a static html. I also confirmed that “Embedding is not yet supported on Template.” I look forward to helping with testing these capabilities.

I am considering using panel template as html as a deliverable to non-technical clients. It promises to be an exciting new and value-added way of delivering analysis results to my clients.

Before working with Panel, I was experimenting with HoloMaps in Holoviews. I posted a datetime/hover text bug at using HoloMap breaks hover text for datetime values · Issue #5000 · holoviz/holoviews · GitHub more than three weeks ago. There has been no response. Where should I be posting this type of information?

I have posted this information on this thread because the HoloMap could be an interim work-around to not being able to embed with Templates, except that the loss of hover text for datetimes is a deal breaker for me.

Thanks again.