projectmesa/mesa

How to change the default UI of Mesa

the5solae opened this issue · 2 comments

Hi! I was wondering if anyone can advise me on how I can change the general look and feel of the UI.
Any help is greatly appreciated!

rht commented

Did you refer to mesa.visualization.ModularServer? For this one, you can modify https://github.com/projectmesa/mesa-viz-tornado/blob/main/mesa_viz_tornado/templates/modular_template.html with CSS, and change the layout and so on. This requires forking Mesa and modifying the HTML/JS files that are used by ModularServer.

There is also mesa.experimental.JupyterViz, you can see how this can be tweaked in #1825 and #1800, and with CSS (see e.g.

solara.Style(
"""
.widget-play {
height: 30px;
}
"""
)
). This doesn't require forking, and is simpler to implement.

Hi @rht thank you for pointing me to those resources. I'll try using mesa.experimental.JupyterViz