diff --git a/examples/mwe_solara.py b/examples/mwe_solara.py new file mode 100644 index 0000000..c8390f1 --- /dev/null +++ b/examples/mwe_solara.py @@ -0,0 +1,20 @@ +import solara +from ipymolstar import PDBeMolstar + + +@solara.component +def Page(): + expanded = solara.use_reactive(True) + + with solara.Sidebar(): + solara.Checkbox(label="Expanded", value=expanded) + + with solara.Card(style={"width": "500px"}): + PDBeMolstar.element( + hide_controls_icon=True, + hide_expand_icon=True, + hide_settings_icon=True, + hide_selection_icon=True, + molecule_id="1qyn", + expanded=expanded.value, + )