I’m creating a chat UI, and I’m relatively new to app development. I noticed that Google’s Bard has some interesting features. For example, when a user clicks the dislike button, it triggers a container to appear and collects feedback from the user. I’m wondering how I can replicate this functionality because I haven’t been able to find any solutions. Any suggestions would be greatly appreciated.
How can I render a new container when clicking a button within an existing container in plotly-Dash?
hi @Ananthzeke
Welcome to the community
You can add the ‘dislike’ button as an Input argument to the callback. Then, inside the callback function you could create and return a new dcc.Input component (the Output argument can be an empty Div where the Input component would go).
1 Like
Welcome to the community, @Ananthzeke.
Adding to @adamschroeder’ answer, this example of creating components dynamically could be helpful:
1 Like
Thanks @adamschroeder