Bootstrap Icons v1.4.1

@mdo March 29, 2021

Our latest Bootstrap Icons update has arrived to fix a few bugs and improve our build tooling. Keep reading for what’s new.

Key changes

Here are the highlights from this release:

  • Updated: PowerPoint icons now look more capitalized
  • Fixed: skip-forward and skip-backward icons are now properly named
  • Fixed: mic and record icons no longer appear filled
  • Fixed: Codepoints for icon font will no longer change between versions
  • Upgraded SVGO to v2.3.0, bringing some minor SVG optimizations to ~200 icons

The update to codepoints is the most important change in this release. It ensures the content property values for each icon doesn’t change. This gives our icon font more stability between versions, allowing for easier upgrades and maintenance.

Check out the release notes for more changes in v1.4.1.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

Bootstrap 5 Beta 3

@mdo March 23, 2021

Our final beta for Bootstrap 5 has come with some amazing new changes (including a new component!), documentation updates, and more. We’ve also fixed some important bugs since our last release, in particular with our dependencies. Next up is our stable release!

Keep reading for a recap of what’s new in Beta 3.

New offcanvas component

Offcanvas example

Thanks to our newest team member, @GeoSot, we have a brand new component to unveil in Beta 3—introducing offcanvas! Built on and sharing fundamental pieces of our modals, the offcanvas comes with configurable backdrop, body scroll, and placement. Offcanvas components can be placed on the left, right, and bottom of the viewport. Configure these options with data attributes or via the JavaScript APIs.

We’re excited about iterating on the new offcanvas component and building additional examples and demos with you. Please share any feedback on an issue or pull request as you start to use it in your projects.

New and refreshed examples

New examples

Our examples have been updated in Beta 3 as well. We’ve added four brand new snippet-heavy examples and refreshed a few others. New with this release are several snippets for headers, heroes, features, and sidebars. These new snippets will continue to grow with new additions over time, showing just how fun and easy it is to build with Bootstrap.

New starter example

We’ve also updated our starter template with a refreshed, simplified design and more resource links. We’ll also incorporate this new look and feel into our npm starter project project, and eventually add a Parcel starter project.

Lastly, we’ve updated our pricing, checkout, and sign-in examples. We’ve also added a new jumbotron example to show you how to create your own jumbotron since we removed it in Bootstrap 5.

Improved Sass docs

New Sass docs

Since our last release, we’ve added a new section to nearly every component and utility documentation page for the source Sass code. Where appropriate, we now list Sass variables, maps, loops, and animation keyframes. These are directly linked from our source files, so whenever we ship new code, they’ll automatically be up-to-date.

And more!

Some highlights from the rest of our documentation updates and bugfixes include:

  • Added new .list-group-numbered variation to list groups that uses pseudo-elements for numbering list group items.
  • Removed explicit focus state suppression in Reboot
  • Improved carousel swipe behaviors for RTL
  • Updated accordions to improve transitions and borders when animating
  • Updated Sass customization docs to show how to properly override default variables
  • Fixed tooltips not appearing after rapid focus in and out
  • Fixed dropdown events not bubbling and forms inside dropdowns not propagating
  • Removed flip option from dropdowns
  • Disabled select now render consistently in Chrome
  • Button elements now grow in .nav-fill and .nav-justified
  • JavaScript plugin constructors now accept CSS selectors
  • De-duped the .border-0 utility
  • Fixed event handler removal in dropdown/carousel dispose
  • Added new Parcel guide to the docs
  • Added input focus blur Sass variable
  • Updated .browserslistrc to drop Android and add Safari/iOS 12 as the new minimum version (completing our two latest major releases guideline for supported browsers).

Head to GitHub for a complete list of issues and pull requests in v5 Beta 3. You can also review the v5 beta 3 project board, too.

A huge thanks to another new team member, @rohit2sharma95, for the dozens of pull requests, bug fixes, and code reviews for our JavaScript plugins.

Get the release

Head to https://getbootstrap.com to explore the new release. We’ve also published this updated as a pre-release to npm, so if you’re feeling bold or are curious about what’s new, you can pull the latest in that way.

npm i bootstrap@next

What’s next

Looking ahead, we’re eyeing our first stable release for Bootstrap 5! But we also have some other releases on the horizon:

As mentioned in our last release, after v5 goes stable, we’ll look to add some of the awesome features we’ve built up in our backlog. Check out the v5.1 project for an idea of what’s being planned. Feel free to open issues or pull requests if you have any additional ideas!

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

Bootstrap Icons v1.4.0

@mdo February 22, 2021

Bootstrap Icons v1.4.0 adds over 60 new icons as part of a brand new weather category. Also included are some long requested improvements to vertical alignment and a handful of updates to tags and categories.

Keep reading for a preview of the new icons and how icon alignment has changed.

60+ weather icons

New icons in v1.4.0

The new weather category includes over 60 icons for various weather and atmospheric conditions. From fog and haze to rainstorms and hurricanes, we now have icons for just about every weather situation. We undoubtedly have some more work to do to refine and add to this new category, but it’s a pretty big addition to the project. Let us know what you think and what’s missing so we can keep adding to it over time.

Alignment changes

Alignment changes

Also new in v1.4.0 are some alignment changes—before and after are shown above. Previously we used vertical-align: text-top in our CSS to aligning individual icons. This wasn’t as much of an issue when we only had SVGs, but with the addition of icon fonts and their generated CSS in v1.2.0, we had to make some changes.

New in this release is a change to vertical-align: -.125em. This new alignment is similar to that found in the tried and true Font Awesome project. This change essentially raises icons up about 1px to better vertically center them with nearby text.

It may not be perfect in all implementations, so additional changes might still be needed, but this should give you a stronger baseline to start (pun intended). Should you still run into issues, please don’t hesitate to open an issue on GitHub.

And more…

We’ve also made several updates under the hood, from dependencies to build tools. This has resulted in improved speeds for our development scripts and more resilient tooling for packaging our icons. We’ve also included category names into the fuzzy search on the homepage, making it a lot easier to search for groups of icons.

We still have some work to do on our docs and search, so stay tuned as we’ll eventually add category pages and more for easier browsing and navigating. If you’re reading this and want to help improve the Bootstrap Icons docs, please consider opening a PR anytime.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

Bootstrap 5 Beta 2

@mdo February 10, 2021

Our second beta has arrived for Bootstrap 5! We delayed its release to iron out some issues with third-party libraries and stabilize our major changes. We’ve also once again shipped some awesome updates to our documentation.

Next up is our final beta, which we may even promote to a stable release depending on how development proceeds. Stay tuned for that!

Dropdown docs screenshot

Dropdowns saw a lot of work in Beta 2 because of how much has changed in both our JavaScript and in Popper.js (which we depend on for most dropdown, popover, and tooltip positioning). We’ve modified our dropdown plugin to add a new data attribute to help separate our own positioning styles with that of Popper’s. The issues we saw—like a .dropstart menu overlapping a button or an incorrect responsive .dropdown-menu-end class—were largely the result of competing positioning.

Now when dropdown menus have data-bs-display="static", we’ll add data-bs-popper="static" via JavaScript to their associated .dropdown-menu. When dropdowns are in our navbars, their menus will have data-bs-popper="none" added. This separates two different positioning libraries, ours and Poppers, and ensures all behaviors are supported. You can see all the options in a new example in our docs. We updated our CSS selectors to use these new data attributes, too.

In addition, we’ve removed the initial margins from dropdowns and popovers, instead of relying on Popper’s offsets. These also conflicted with the default styling for elements positioned by Popper.js. Relatedly, there was a bug in how popover arrows were aligned that has now been resolved.

Color utility docs

Sass docs screenshot

We’ve overhauled our color utility documentation, separating the text color classes from our background-color ones. We’ve also made extensive use of our scss-docs shortcode to include tons more code snippets in our docs.

Both pages now include a new Sass section, showing relevant snippets of our source code that are related to each set of utilities. We list all our available color variables, our theme color variables and maps, associated mixins and loops, and even where these utilities are generated in the utilities API.

Expect this kind of documentation improvements to continue into our next release. Follow along in the draft pull request that adds Sass docs to all our components on GitHub.

JS updates

We’ve spent a significant amount of time in Beta 2 improving our JavaScript plugins to fix bugs and improve behaviors since dropping jQuery.

  • Dropdown now emits events on the .dropdown-toggle instead of the .dropdown.
  • Restored the offset option for dropdowns.
  • Fixed modal toggling when clicking on data-bs-toggle="modal".
  • We now build our base component as a separate .js file.
  • We now prevent getSelector from returning URLs as selector which caused errors in dropdown and scrollspy plugins.
  • Refactored components to use a utility function to define jQuery plugins

Miscellaneous updates

Across the board, we’ve made a few small changes to other components that are worth a brief mention here.

  • Navbars:
    • Added a new .navbar-nav-scroll class to enable vertical scrolling when a collapsed navbar is opened. It’s customizable via Sass and a CSS variable. Read more in the docs.
    • We’ve re-added flex-grow to the .navbar-collapse to restore the flexbox behaviors from v4 and prevent some content from being inadvertently squished.
  • Forms:
    • Removed vertical-align from .form-select
    • Form validation mixin updated with additional parameters
    • Fixed validation icon placement in .form-select
    • Checkboxes and radio buttons are aligned better in input groups
  • Buttons:
    • Added variables for tinting and shading button state colors
    • Suppressed the default focus outline for buttons in Chromium
  • Toasts:
    • Added word-break to .toast-body
    • Added a live example to the docs to trigger a real toast
  • Bundles:
    • Added our helpers to the utilities CSS bundle
  • Carousels:
    • Updated docs examples to use <button>s wherever possible instead of <a> elements.
    • CSS selectors changed for using <button>s as indicators (from .carousel-indicators li to .carousel-indicators [data-bs-target]).

For a more complete list of changes, check out the v5 Beta 2 project board or list of issues and PRs in this release.

Get started

Head to https://getbootstrap.com to explore the new release. We’ve also published this updated as a pre-release to npm, so if you’re feeling bold or are curious about what’s new, you can pull the latest in that way.

npm i bootstrap@next

What’s next

We have three releases coming up next for the team:

  • Bootstrap v5.0.0-beta3 (possibly promoted to v5 stable)
  • Bootstrap v4.6.1 (bringing in some more bugfixes and alignment with the latest in v5)
  • Bootstrap Icons v1.4.0

Our v5 Beta 3 will continue to focus on JavaScript issues and documentation improvements. Tooltips in particular need some attention after our fixes to dropdowns and popovers. After v5 goes stable, we’ll look to adding some of the awesome features we’ve built up in our backlog. Check out the v5.1 project for an idea of what’s being planned.

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

Bootstrap v4.6.0

@mdo January 19, 2021

Bootstrap v4.6.0 is here with a couple new features, several bugfixes, and some awesome documentation updates to make v4 more maintainable alongside our development of v5.

Read on for the highlighted changes or head to the v4.6 docs to see the latest in action.

Hugo!

The biggest change in v4.6.0 is under the hood—we’ve overhauled our development environment to match that of v5. Our v4.x docs are now powered by Hugo. That means no more Ruby dependency for v4.x, improved maintainability between major versions, faster development, and incredibly fast build times compared to Jekyll.

Changes

Also available in the v4.6.0 release on GitHub.

Highlights

  • Tooltips and popovers can have custom classes via customClass option.
  • Added new .navbar-nav-scroll class for scrolling expanded navbar contents on mobile devices.
  • For improved accessibility, spinners now slow down when prefers-reduced-motion is enabled.
  • v4.x docs are now built on Hugo for easier maintenance and backports from v5.x.
  • Darkened background-color of .dropdown-item for improved hover state contrast, and lightened the disabled .dropdown-item color.
  • Improved alignment of form validation tooltips.
  • File inputs no longer extend beyond their containers.

CSS

  • #31557: Fix form validation tooltip alignment
  • #31657: Handle the Ubuntu sans-serif case
  • #31700: Suppress flexbox side effects in breadcrumb
  • #31882: Slow down spinners when prefers-reduced-motion
  • #31886: Fixed: Undefined mixin “deprecate” when importing “bootstrap-grid-scss”
  • #32141: Use correct value order
  • #32145: Avoid invisible real file input “spilling” out of container
  • #32160: Add overflow suppression to custom file label
  • #32211: Move negative margin-bottom from .nav-item to .nav-link
  • #32212: Remove needless Stylelint disables
  • #32833: Add .navbar-nav-scroll for vertical scrolling of navbar content
  • Add two new variables for pagination border-radius values; backport of #32423
  • Remove old/unnecessary reboot bug fix; backport of #32631
  • Suppress focus outline for buttons when it shouldn’t be visible in Chromium; backport of #32689
  • Consistently use outline:0 rather than outline:none; backport of #32751
  • Darken dropdown item hover style; backport of #32754
  • Lighten disabled dropdown text to $gray-500

JS

  • #31820: Check for data-interval on the first slide of carousel
  • #31834/#32225: tooltip/popover: add a customClass option
  • #32001: Move js/src/index.js one folder up
  • #32045: tests: fix sanitizer test
  • #32220: Don’t hide modal when config.keyboard is false
  • #32312: build-plugins: switch to “bundled” for babel helpers

Docs

  • #31861: Split up dropdown sizing docs to improve rendering
  • #31892: Remove redundant visually hidden “(current)” from pagination controls
  • #31893: manifest.json: Switch to relative URLs so that we don’t need to change the path with every major/minor release
  • #31898: switch to suggesting jsDelivr as a CDN
  • #31904:
    • docs(forms): use a legend for fieldset instead of aria-label
    • docs(forms): fix incorrect legend nesting in fieldset
  • #31936: forms: change inline custom radio name
  • #31951: Update anchor-js to v4.3.0
  • #31960: Explicitly mention emoji fonts, tweak sentence in typography
  • #31981: list-group.md: fix snippet
  • #32005: Remove bugreport.apple.com since it doesn’t work
  • #32015: Fix redirects
  • #32050: Make docs anchorjs links darker on keyboard focus
  • #32054: Add callouts about using light colors ideally on a dark background
  • #32077: Switch to Hugo
  • #32083: mention “Liberation Sans”
  • #32087: download.md: link to JS files comparison too
  • #32094: Changes to navbar documentation/explanation
  • #32106: Clarify JS bundle docs once more for v4
  • #32137: input-group.md: fix wrong class .visually-hidden
  • #32138: navbar.md: remove loading=lazy from snippets
  • #32147: Fix caniuse.com redirects
  • #32151: Mention user-select-all support in docs
  • #32196: homepage: split snippets and show copy buttons
  • #32203: Switch to jsDelivr for the remaining docs assets
  • #32223: introduction: split comments
  • #32247: Fix typos in tooltip/popover docs
  • #32253: Add Russian translation
  • #32363: Remove useless .text-left in Layout / Overview
  • #32399: Remove duplicated “follow Bootstrap on Twitter” link in Community section
  • #32457: Add mention of the bs-custom-file-input plugin needed for the custom file input
  • #32461: style clipboard button on :focus, not just :hover
  • #32462: Replace Lorem Ipsum placeholder text with more representative (or at least english language) text
  • #32634: Remove incorrect mention of dropdowns for dynamic tab behavior
  • #32639: v4: Add an actual data-touch="false" example in the carousel docs
  • #32728: add v5.0 in versions
  • #32761: Mention stretched-link constraints with table elements
  • #32789: Remove role="button" from CTA links in carousel example
  • #32791: Docs v4: Sass implementation and rounding precision
  • #32809:
    • Clarify Sass import and customize docs for how to modify variable defaults
    • Add an npm starter project callout to a few pages
  • #32827: Add a live toast example to the docs
  • #32759: Mention CSP and embedded SVGs in v4 docs
  • docs(dropdowns): clarify where is .show applied
  • Require .has-validation for input groups with validation
  • Fix mobile menu jump & double border
  • Remove double spaces from homepage SVGs
  • browserconfig.xml: switch to relative image path
  • Tweak the wording for collapse to indicate button is preferred/more semantic; backport of #32632
  • Clarify the $enable-shadows option in our docs; backport of #32685

Examples

  • #31979: v4 Examples/Floating-labels: fix bad behavior with autofill
  • #32198: examples: add the version number in title

Misc

  • #29753: Improve build/generate-sri.js regex
  • #32003: CI: switch to Node.js 14
  • #32008: Update Edge’s Rendering Engine on CONTRIBUTING.md
  • #32486: BrowserStack: test on macOS Catalina instead of High Sierra
  • #32756: Stylelint: disallow some property values
  • Fix for npm 7.x package.json: move version_short variable under the config object; backport of #32737
  • Update build-examples script so that the resulting examples zip file includes only the needed files
  • Various CI tweaks
  • Updated devDependencies

Next up

Our second beta of v5 is coming. We’re working on ironing on some kinks from the update to Popover 2, which has taken longer than expected. This affects our dropdowns, popovers, and tooltips. Once some of the major issues are resolved, we’ll ship our next beta.

Please keep the feedback coming on what we can improve, how our releases are performing, and any other suggestions.

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

Bootstrap Icons v1.3.0

@mdo January 07, 2021

Say hello to over 60 new icons with Bootstrap Icons v1.3.0! We focused our efforts on filling in some holes and expanding some coverage of a few categories. We’re super happy with how the new additions came out and hope y’all love them, too!

As usual, we also snuck in some bug fixes to existing icons and ours docs. After this release, we’re back to focusing on shipping updates to Bootstrap v5 and v4. More on that soon, and in the mean time, enjoy the new icons!

60+ new icons

New icons in v1.3.0

Here’s a look at the new icons in v1.3.0:

  • Added window-dock and window-sidebar
  • Added two symmetry icons
  • Added new stack icon
  • Added two speedometer icons
  • Added four save icons
  • Added rulers icon
  • Added filled variations for phone-vibrate, mouse, mouse2, mouse3, and four hand icons
  • Added several border icons
  • Added paint bucket
  • Added four new badges (3D, AR, VR, WC)
  • Added four lightbulb icons
  • Added eyedropper
  • Added mask icon
  • Added three color palette icons
  • Added layer-forward and layer-backward
  • Added two eraser icons
  • Added two megaphone icons
  • Added four push pin icons
  • Added Whatsapp and Telegram social icons
  • Added dotted circle dash, circle plus, square dash, and square plus

Have some ideas for new icons we should consider? Open an issue to tell us about it!

CDN quickstart with icon fonts

Since we added icon fonts in v1.2.0, it’s been possible to use a CDN to deliver and use Bootstrap Icons in seconds. Include the stylesheet, place short HTML snippets where you want icons, and you’re done! If you want to include it yourself, here’s how.

  1. Include the Bootstrap Icons font stylesheet in the <head> of your website. Or, use @import to include the stylesheet that way.

    <!-- Option 1: Include in HTML -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
    
    /* Option 2: Import via CSS */
    @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css");
    
  2. Add HTML snippets to include Bootstrap Icons where desired.

    <i class="bi-alarm"></i>
    

Want to see it in action? We’ve put together a helpful CodePen demo for using Bootstrap Icons fonts via CDN.

ProTip: Most browsers do not allow SVG sprites to be used across domains, which is why having icon fonts (when SVGs are the preferable and more accessible method of delivering icons) are so useful. Whenever possible, please use SVGs over icon fonts.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

Bootstrap Icons v1.2.2

@mdo December 23, 2020

We’re ironing out the kinks in our new font files with Bootstrap Icons v1.2.2! We went back to the Figma file and ironed out all the fill-rule details to ensure our SVGs translated into font files properly.

We also snuck in a few bug fixes to existing icons, docs, and some slight visual improvements to some existing icons. Get the details below!

Font files

Our icons fonts are (fingers crossed!) free of visual glitches that made so many unusable across Windows devices. For some reason macOS and iOS had no problems, but Windows butchered the font files. Turns out this was a result of inconsistent fill-rule values in our icons, and some font formats and renderers only support a non-zero fill rule. We revisited nearly every icon and got it all sorted out.

Icon fonts

Massive shoutout to the Figma Fill Rule Editor plugin that made this relatively quick and painless to update. You can even see in the plugin’s image below how this rule affects rendering of SVGs.

Figma Fill Rule Editor plugin

Check out the PR for what’s changed under the hood.

Updated icons

Revised icons

A few icons got touched up with the work for our font files to clean up paths and make them more visually pleasing.

  • Locks are a little more legible—they’re taller and narrower.
  • Laptops now have a half pixel gap between their base and screen, making them look a little sleeker.
  • Shields are 1px taller now, with their inner icons now raised 1px as well. No reason to make them not take up the full viewBox.
  • Stopwatch icons look more like actual stopwatches with separate start/stop and lap buttons.
  • The bricks icon has its missing grout line restored.
  • Renamed patch fill icons to fix typos in their file names (fll to fill).

Have some other refinements we should consider? Open an issue to tell us about it.

Last but not least, we ironed out some docs issues. Our navbar is fully functional and inline with the v5 beta site. We also added new aliases for icon filtering on homepage.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

Bootstrap Icons v1.2.1

@mdo December 12, 2020

Just a quick release to fix a typo in our package.json for including the font files in our published package.

Get it via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Bootstrap Icons v1.2.0

@mdo December 11, 2020

Our latest Bootstrap Icons release includes dozens of new icons, redesigned documentation, and the most highly requested new feature—icon fonts!

New social icons

We’re starting slow with social icons—just a handful of the biggest sites and networks folks are likely to need. We’ll keep this list purposefully small as the intent isn’t for full coverage. We’ll aim to add a few over time, but this should suffice for the time being!

Social icons

New media icons

The other main addition is our extended suite of media icons. We had folks ask for more options when it came to media controls, as well as different media types, so we’re getting the ball rolling with this update.

Media icons

Icon fonts!

Finally, they’re here! We’re now generating web fonts for our icons thanks to a wonderful project, Fantasticon. To start, we’re generating two web font formats—.woff and .woff2. We’re also including an HTML index of all icons in web font format, powered by a generated CSS file.

Web fonts index

This is our first foray into icon fonts, and we’re likely to make some tweaks along the way. Help us iron out any kinks by testing the fonts yourself and sharing any feedback in an issue.

Refreshed docs

New Icons homepage

The homepage for Bootstrap Icons has a new look thanks to an updated hero. The new hero features a new colorful icon image, clearer project description, and an upfront npm i snippet to help folks get started faster. A new notice at the top links to the blog post to tell folks what’s new, too.

New Icons permalink

Individual icon permalink pages have also been refreshed and greatly simplified. We’ve reduced the main example down to one instance of the icon, and expanded the examples below it to include the icon in more Bootstrap components.

The new permalink sidebar also features new and improved access to the icons. Need just an SVG or two? Use the new Download SVG button. Looking for the HTML for the new icon fonts? Just copy-paste. And as always, want the raw SVG HTML? That’s still there, too.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

Bootstrap 5 Beta 1

@mdo December 07, 2020

With our first beta release of Bootstrap 5, we’re calling it on new features and breaking changes. From here on out, we’re only fine-tuning features, bugs, and documentation on our way to a stable v5 release. Woohoo!

Just like with the v4 development process, our docs for v5 have been temporarily hosted on a subdomain for the next major release. Starting today, those docs are being moved to the main domain and our old v5.getbootstrap.com domain will redirect.

There are some really awesome new features—RTL!—that have been added in this release, and they’ve come with some important changes. Keep reading for the lowdown and let us know what you think!

RTL

Bootstrap RTL docs

Our biggest addition to the project in years, we’ve finally added RTL support to Bootstrap! Please join me in giving @ffoodd—one of our newest contributors and author of the RTL pull request—a massive thank you. The pull request includes nearly 50 references to existing issues and PRs that have tried to implement the feature into our core.

At a high level, our RTL approach includes a handful of changes:

Our approach is built on RTLCSS, an awesome project that helps reprocess an existing LTR stylesheet for RTL. We’ve classified it as an experimental feature for now, anticipating that we’ll get some of this wrong. We’re looking to the community to help us round out the feature as we wrap up some remaining todos.

This issue has some outstanding todos already planned for our team to address. See something else we can improve? Please consider opening an issue or pull request.

Read up on RTL in Bootstrap in our docs, including required HTML changes, a starter template, details on our approach, and more.

Renamed classes for logical properties

Part of our approach to adding RTL to Bootstrap was to add it in a way that felt future-friendly to ourselves and the web at large. As such, we’ve embraced the spirit of CSS logical properties and have renamed several classes and variables. It’s a risky change because of the size and impact of the change, but we hope you’ll appreciate it overall!

Most of you have already interacted with logical properties thanks to our flex utilities—they replace direction properties like left and right in favor start and end. Things like align-items-end have been welcomed additions. This makes horizontal directional class names appropriate for LTR and RTL without any additional overhead moving forward.

For example, in a LTR context, instead of .ml-3 for margin-left, use .ms-3. Be sure to read the RTL Migration guide for a full list of renamed classes and variables.

Popper.js v2

Popper.js

We’ve upgraded Popper.js from v1.x to v2.x, bringing with it some small breaking changes to our tooltips and popovers. These two changes are why we haven’t been able to update to v2.x sooner.

  • Removed offset option from our Tooltip/Popover and Dropdown plugins; this can still be achieved using the popperConfig parameter.
  • The fallbackPlacement option has become fallbackPlacements.

Popper.js v2 also comes with a smaller file size for our primary dependency, updated positioning calculations, and much more. Beyond that, our tooltips and popovers are unchanged and just as powerful.

Namespaced data attributes

We’ve renamed all our data attributes to include bs as an infix, thereby namespacing all the HTML attributes that enable JavaScript behaviors from our plugins. See #31827 for details. It helps keep Bootstrap-required JavaScript triggers clearly identified throughout your projects.

Making this change is a tad annoying, but easy enough to remedy with a find and replace. The new attributes work just like the old ones, just a little more specific. For example, here’s a dropdown button and menu with the newly renamed data-bs-toggle attribute.

<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown button
  </button>
  <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
  </ul>
</div>

New toast positioning

Popper.js

After dabbling in some JavaScript solutions to positioning toasts, we’ve landed on a new CSS-only approach thanks to our new positioning utilities. This comes with some minor breaking changes—namely some changes to exact CSS properties and how we toggle visibility of the toasts—but largely keeps them intact.

Our docs have been updated to include a new position preview picker, too, so you can see them in action. See the pull request for more details.

JS enhancements

Beyond the namespacing, we’ve been chipping away at a few other JavaScript improvements and bug fixes. Here’s a rundown of what’s new:

  • Created a new base component to share logic across our components. See #29370.
  • Migrate to more modern APIs across our plugins. See #32095.
  • Tooltips and popovers can now have custom classes. See #32217.
  • Don’t hide modal when config.keyboard is false. See #32179.

More JavaScript updates are coming soon, from performance and file-size improvements to new features.

States in the utilities API

One of the biggest new features of Bootstrap 5 is our utilities API, an extensible way to customize, add, or remove Bootstrap utilities. We’ve been iterating along the way and our newest improvement is the ability to add pseudo-class variants with the state option.

Use the state option to generate pseudo-class variations. Example pseudo-classes are :hover and :focus. When a list of states are provided, classnames are created for that pseudo-class. For example, to change opacity on hover, add state: hover and you’ll get .opacity-hover:hover in your compiled CSS.

Need multiple pseudo-classes? Use a space-separated list: state: hover focus.

$utilities: (
  "opacity": (
    property: opacity,
    class: opacity,
    state: hover,
    values: (
      0: 0,
      25: .25,
      50: .5,
      75: .75,
      100: 1,
    )
  )
);

Which outputs to:

.opacity-0-hover:hover { opacity: 0; }
.opacity-25-hover:hover { opacity: .25; }
.opacity-50-hover:hover { opacity: .5; }
.opacity-75-hover:hover { opacity: .75; }
.opacity-100-hover:hover { opacity: 1; }

See #31643 for more context on the change.

And more…

Elsewhere we’ve made a handful of other breaking changes and improvements. The most notable updates include:

  • Breaking: Renamed scale-color() function to shift-color() . See #32149.

  • Breaking: Simplified the make-container() mixin and $container-padding-x. See #31735.

  • Fixed: Corners remain rounded now in vertical button groups. See #31303.

  • Fixed: Removed default linear gradient on some table rows that caused undesirable performance. Still more work to do here FYI. See #32277.

  • Updated: Breadcrumbs now have a simplified appearance. Use utilities to restore the padding, background-color, and border-radius as desired. See #32249.

  • Updated: Finalized browserslist configuration to match our supported browsers. See #30986.

For a more complete list of of changes, checkout the v5 Beta project board or list of issues and PRs in this release.

Get started

Head to https://getbootstrap.com to explore the new release. We’ve also published this updated as a pre-release to npm, so if you’re feeling bold or are curious about what’s new, you can pull the latest in that way.

npm i bootstrap@next

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.