๐Ÿ…ฑ๏ธ Bootstrap Framework

Top 12 Bootstrap 5 Components Every Developer Should Know

By The CodeCraft Teamยทยท9 min read
Grid of Bootstrap 5 UI components on a dark theme

Bootstrap 5 ships ready-made components for nearly every UI pattern. These twelve are the ones you'll reach for again and again โ€” learn them once and you'll prototype faster than ever.

  1. Navbar โ€” responsive top navigation
  2. Cards โ€” content containers
  3. Modal โ€” dialog popups
  4. Offcanvas โ€” slide-in panels (mobile menus)
  5. Accordion โ€” collapsible sections
  6. Toast โ€” non-blocking notifications
  7. Carousel โ€” image sliders
  8. Dropdown โ€” menus and select-like UI
  9. Tabs & Pills โ€” section switchers
  10. Forms โ€” inputs, validation, and floating labels
  11. Buttons & Button Groups โ€” actions and toolbars
  12. Pagination โ€” page navigation

Example: a minimal modal

<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#demo">Open</button>

<div class="modal fade" id="demo" tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header"><h5 class="modal-title">Hi</h5></div>
      <div class="modal-body">Hello world.</div>
    </div>
  </div>
</div>

Frequently asked questions

Can I use Bootstrap components without jQuery?

Yes โ€” Bootstrap 5 dropped jQuery completely. It uses vanilla JS.

Enjoyed this article?

Share it with a fellow developer or explore more tutorials in our blog.

More articles

Related articles