Migrating from Bootstrap 4 to Bootstrap 5
Some main changes from my experience:
1. Quick find and replace #
- replace
badge badgewithbadge bg - replace
jumbotronwithcard bg-light - replace
card-deckwithrow row-cols-1 row-cols-md-2 g-4orcard-group - replace
form-groupwithmb-3 - replace
font-weightwithfw
2. Replace all dropdowns with bootstrap 5 dropdown code, including navbar #
3. Margins #
left and right replaced with something like start and end.
Meaning, we would have <ul class="navbar-nav me-auto"> and <ul class="navbar-nav me-auto"> for navbar-end (right) and navbar-start (left)
Surely, there’s more but these are the basics to get it working :) #
Did you like this article? Did it save you some time?