Interactive blocks on Anvil

Hey

Any idea how I can add an interactive 2d block on my Anvil website
Lets say I want to show the user a 2D square and ask them to choose one or more of the block sides.
When the user hovers over one of the block sides I want the side to be highlighted
If the user chooses the side (mouse click) I want the side to stay highlighted unless clicked again

At the end the user will press Confirm and a list called chosen sides will be created:

ChosenSides = [True, True, False, False]

There’s nothing built-in like this. However, this should give you a big head-start:

1 Like