As we all know Bootstrap is the most popular front-end framework for building responsive websites. Bootstrap released a new beta version Bootstrap 5.0.0-alpha1 on 17th June 2020. It has introduced some of the very useful features. Let us take a look at what Bootstrap 5 has to offer!
Bootstrap no longer depends on jQuery and has dropped support for Internet Explorer. They are sharpening their focus on building tools that are more future-friendly, and while they are not fully there yet, the promise of CSS variables, faster JavaScript, fewer dependencies, and better APIs certainly feel right.
Docs page are no longer full-width to improve readability and make the site feel less app-like and more content-like. Also, they have upgraded sidebar to use expandable sections for faster navigation.
They have come up with a brand-new logo! Just B in a rounded square. Inspired by the CSS that created the very beginnings of this project, logo embodies the feeling of a rule set—style bounded by curly braces
One of the very major changes that bootstrap underwent was removing jQuery. As a result, project size will be lighter than in v4 projects. It is mentioned that they have made significant changes in JS for v5.
One of the other larger changes was dropping the bulk of Button plugin for an HTML and CSS only approach to toggle states. Now toggle buttons are powered by checkboxes and radio buttons and are much more reliable.
A handful of other changes and enhancements to JavaScript in v5 that focus on code quality and bridging the gap between v4 and v5.
Bootstrap supports the latest, stable releases of all major browsers and platforms. This also includes the latest version of Legacy Edge (EdgeHTML layout engine).
Bootstrap have now dropped the support for IE. So, if you have to use bootstrap on IE, you will be limited to v4 of Bootstrap. It has been done keeping in mind to use CSS custom properties and other new features.
For Firefox, the latest Extended Support Release (ESR) version is also supported.
However, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, and Firefox for Linux, though they are not officially supported.
With Bootstrap 5, people will now be able to use custom CSS. In previous versions, CSS custom properties were only included in a limited set of root variables for colors and fonts. But with version 5, they are available in components and layout options as well.
Bootstrap has included many CSS custom variables in its compiled CSS. These provide easy access to commonly used values like theme colors, breakpoints, and primary font stacks when working in your browser inspector, a code sandbox, or general prototyping.
All the custom properties are prefixed with bs- to avoid conflicts with third party CSS.
Take for example our .table component, where we have added a handful of local variables to make striped, hoverable, and active table styles easier:
With v5, they have gone fully custom with form controls — checks, radios, switches, files, and more. These new form controls are all built on completely semantic, standard form controls — no more superfluous markup, just form controls and labels.
Form controls expand on Rebooted form styles with classes. Be sure to use an appropriate type attribute on all inputs (e.g., email for email address or number for numerical information) to take advantage of newer input controls like email verification, number selection, and more.
Bootstrap has updated the grid system. Here are the listed changes on their website:
While Bootstrap does not include an icon set by default, they do have their own comprehensive icon library called Bootstrap Icons. We can use them freely or any other icon set in our project.
Bootstrap Icons is a growing library of SVG icons.
Alternatives:
Below icon sets are tested as preferred alternatives to Bootstrap icons.
Third Alpha is out with loads of updates with components, utilities, docs, form, JavaScript and more!
Components
There are few improved components in this release.
They have dropped the .card based accordion for a brand new .accordion component. New accordion still uses the Collapse JavaScript plugin, but with custom HTML and CSS to support it, it is better and easier than ever to use.
Support for a flush accordion (add .accordion-flush) is included to remove the outer borders, allowing for easier placement inside parent elements.
They have dropped the .btn-block class for .d-grid and .gap–* utilities. This allows for the same behaviour and style, but with much greater control over spacing, alignment, and even responsive layout options.
There are a few updates to the plugins.
There have added some new default utilities to make life a little easier:
Forms now have floating labels as a fully-fledged form layout option and a new file input.
Floating labels include support for textual inputs, selects, and textareas.
They have dropped custom .form-file class for additional styles on the .form-control class. This means we no longer require additional JavaScript to make our file input styles functional—the new form file is all CSS!
There is a new addition class to fix the rounded corners on input groups when using validation. Add the .has-feedback class to the .input-group to enable validation messages inside input groups without any visual regressions.
Bootstrap 5 is still in its alpha version and not fully stable, so I suggest you wait until they release a stable version to update your existing projects with v5. But if you like to test new things, you are most welcome to. Migration from v4 to v5 will apparently be very easy.
Our team of experts will review your project and give you a quote at no cost.
In this episode of the The Lazy CEO Podcast,…
Join us for an enlightening episode of The CEO…
Creating multi-agent workflows is the future of AI development,…
How has sunflower lab's focus on integrating ai, data…
Businesses are quickly shifting towards optimized processes. And the…
Developers often make mistakes when using Power Automate, which…