Skip to content

What is the best way to swap the image of an img element dynamically? For e.g. making a button out of images. #859

Answered by Gremious
Gremious asked this question in Q&A
Discussion options

You must be logged in to vote

Immediately before posting this question I stumble on the answer, so I'm posting it anyway in order to answer it myself, and maybe help someone in the future.

From the looks of the docs, a dynamic container seems to be what I need: https://docs.rs/floem/latest/floem/views/fn.dyn_container.html

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gremious
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant