Far-reaching changes in the alpha release of Bootstrap 5: Farewell to jQuery, ended IE support and a system that can be expanded with utilities are just some of the new features that users can look forward to.
Bootstrap is a CSS framework with ready-made components such as cards, navbars and an integrated grid system that developers can use to create responsive websites quickly and easily.
With the upcoming major release, the focus was on making the migration from V4 to V5 as smooth as possible, according to the official blog post on the alpha release. Nevertheless, the team was not afraid to part with features that are no longer considered to be up-to-date. Bootstrap’s 5th version is no longer based on jQuery and Microsoft’s Internet Explorer is no longer supported by the framework.
Bootstrap 5 makes use of the possibilities of Sass and CSS Custom Properties to offer you a much more flexible design system in the future. In version 4 there were already a number of root variables for colors and fonts, in the new version there should also be options for customizing various components and layout options. For example, the Alpha from V5 offers the local variables .striped, .hover and .active for easier styling of tables; which for components – for example buttons – should follow.
// styles here…
With the release of version 4.5, the Docs homepage has already been revised, V5 now brings a new look for the entire documentation. The focus is on navigation and readability. A section called Customize Docs has been added to the documentation. This contains code snippets that you can use to build on Bootstrap’s source Sass files. To make the start easier for you, there is even a
bootstrap-npm-starterProject and a template repo on GitHub that you can fork.
New static site generator
If the team had previously relied on Static Site Generator Jekyll, the docs are now generated under Bootstrap 5 with a Go-based alternative called Hugo, which above all has performance advantages.
New forms section and expanded color palette
You can find the form styles in a newly created Forms section in the documentation from V5.
Checkboxes, radio buttons, and labels like
range and others have been revised and the new version is based entirely on semantic, standardized form controls.
Bootstrap 5: New color palette
The color palette has also been expanded: V5 has a diverse color system that will allow you to use significantly more colors in the future directly in Bootstrap without leaving the codebase. In addition, the color contrasts were revised and the associated metrics were included in the color docs. The authors of the alpha release blog post hope that this will help make Bootstrap-built websites more accessible.
Based on the latest developments in other CSS frameworks and libraries, Bootstrap 5 comes with a new utility API.
In the future, the API will enable you to create and use your own utilities in Bootstrap using a new Sass-based syntax. Utilities provided by Bootstrap should then also be removable at will. For everyone who uses Bootstrap via OS files, this means a real paradigm shift.
$utilities: () !default; $utilities: map-merge( ( // ... "width": ( property: width, class: w, values: ( 25: 25%, 50: 50%, 75: 75%, 100: 100%, auto: auto ) ), // ... "margin": ( responsive: true, property: margin, class: m, values: map-merge($spacers, (auto: auto)) ), // ... ), $utilities);
To keep the documentation clear, some of the utilities from Bootstrap 4 have been moved to a newly created helper section. Longer code snippets that exceed the length of the usual property-value pairs of the Bootstrap utilities are affected.
Bootstrap 5: Extended Grid System
The grid system in Bootstrap 5 is based on that in Bootstrap 4, but comes with some improvements: With
xxl there is another size and bootstrap 4s
.gutter-Classes were through
<div class="row g-5"> <div class="col">...</div> <div class="col">...</div> <div class="col">...</div>
The new grid system will also replace the form layout options of the framework in the future. Bootstrap 5s grid system also comes with new classes for vertical spacing and
position: relative is no longer the default for columns.
For upcoming releases, the team around the CSS framework will keep an eye on the grid layout, according to the blog post.
Further innovations such as RTL and the implementation of an offcanvas menu are also planned for upcoming releases; until that happens, it’s worth keeping an eye on the Bootstrap blog. If you want to try V5 now, you can go to
npm i bootstrap@next install the latest version – but keep in mind that this is an alpha release, you can stay up to date via https://v5.getbootstrap.com.
Suitable for this: