2
4 Comments

How would you create a Modal Box with a navbar?

Im trying to create a modal box that pops up when clicking on one of the 100+ item of the home page. Each item would open its own modal box with nested navbar at the top.

Any thoughts on how this could work?
I'm currently using Flask but open to using any framework that would make this work.

on January 24, 2020
  1. 1

    You don't need any framework but I always found bootstrap modal to work for me (and binding it together with any front end framework). The whole modal component thing depends on what you exactly need. Flask does not have almost anything to do with this.

    If the navigation inside will be always the same but for different objects then it's simple as creating nav inside and pass obj id or something you would work on there.

  2. 1

    This should be solved with CSS. No need for any CSS framework - unless you already use one.

  3. 1

    What are you using for the frontend? I use VueJS almost exclusively and find slots to be very useful in implementing a modal with different contents.

    1. 1

      Nice, I just had a look at slots and it looks exactly like what I need. I think I will go with that. I can pass in the content coming from other file to my modal box.