When writing an anywidget use vanilla javascript in and do not forget about . The css should look bespoke in light mode and dark mode. Keep the css small unless explicitly asked to go the extra mile. When you display the widget it must be wrapped via . You can also point and to external files if needed using pathlib. This makes sense if the widget does a lot of elaborate JavaScript or CSS. <example title="Example of simple anywidget implementation" import anywidget import traitlets class CounterWidget(anywidget.AnyWidget): esm = """ // Define the main render function function render({ model,…