Icon size
Bootstrap 5 Icon size component
Responsive Icon size built with Bootstrap 5. Examples of ways to resize icons.
How it works
To increase icon sizes relative to their container, use fa-xs
,
fa-sm
, fa-lg
(33% increase), or use literal sizes (to scale it from 1x to 10x) fa-2x
, fa-3x
,
fa-4x
, fa-5x
, fa-6x
, fa-7x
,
fa-8x
, fa-9x
, fa-10x
.
You can make all your icons the same width so they can easily vertically align, like in a list or navigation menu.
Add a class of fa-fw
on the HTML element referencing your icon to set one or more icons to the same fixed width. This is great to use when varying icon widths (e.g. a tall but skinny icon atop a wide but short icon) would throw off vertical alignment. For clarity in the following example, we’ve added a background color on the icon so you can see the fixed width and also bumped up the font-size of the parent element.