A package for building highly interactive user interfaces in pure Python inspred by ReactJS.

At a Glance

Let’s use IDOM to create a simple slideshow which changes whenever a user clicks an image:

import idom

def Slideshow():
    index, set_index = idom.hooks.use_state(0)

    def next_image(event):
        set_index(index + 1)

    return idom.html.img(
            "src": f"{index}/800/300",
            "style": {"cursor": "pointer"},
            "onClick": next_image,

Try selecting the “Live Example” tab in the view above and enabling the widget.

Once activated try clicking the displayed image to make it change 🖱️