If you want to use modular and simple Python code to create beautiful dashboards, try Vizro.
Code of the demo.
Link to vizro.