Dynamically generating modal bar instead thanks to @TomMalbran.