Bootstrap Icons are designed to work with Bootstrap components, from form controls to navigation. Bootstrap Icons are SVGs, so they scale quickly and easily and can be styled with CSS. While they are built for Bootstrap, they will work in any project.
BootstrapVue icon components are built from bootstrap-icons v1.11.0 source SVGs. Icons are opt-in, meaning that they explicitly need to be imported in order to be used. They are not installed by default. You do not need bootstrap-icons as a dependency.
Bootstrap Icons were introduced to BootstrapVue in release v2.2.0.
BootstrapVue icons are not automatically installed when using BootstrapVue in your project, you must explicitly include them.
Icons inherit the current font color and font size from their parent container element. To change the color of the icon, refer to the Variants section, and to change the size of the icon refer to the Sizing section.
All icons are exported with the name in PascalCase, prefixed with BIcon. i.e icon 'alert-circle-fill' is exported as BIconAlertCircleFill, icon 'x' is exported as BIconX, and icon 'x-square-fill' is exported as BIconXSquareFill.
If you are using onlyBootstrapVueIcons or IconsPlugin in your project, you can also just import the required icons CSS, rather than the full Bootstrap and BootstrapVue SCSS/CSS.
BootstrapVue icons SCSS/CSS does not depend on any Bootstrap SASS variables, mixins, functions or CSS classes (other than the Bootstrap text-{variant} text color utility classes, if using the variant prop). Please note that the icons CSS is also included in the main BootstrapVue SCSS/CSS files. Animations effects require BootstrapVue custom SCSS/CSS.
Browser
Icons are not installed by default in the UMD browser build, so you must explicitly include the icons library:
<head><linktype="text/css"rel="stylesheet"href="//unpkg.com/bootstrap@4.6.1/dist/css/bootstrap.min.css" /><linktype="text/css"rel="stylesheet"href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.css" /><!-- Load Vue followed by BootstrapVue, and BootstrapVueIcons --><scriptsrc="//unpkg.com/vue@2.6.12/dist/vue.min.js"></script><scriptsrc="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.js"></script><scriptsrc="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue-icons.min.js"></script></head>
If using just the icons:
<head><linktype="text/css"rel="stylesheet"href="//unpkg.com/bootstrap@4.6.1/dist/css/bootstrap.min.css" /><linktype="text/css"rel="stylesheet"href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue-icons.min.css" /><!-- Load Vue followed by BootstrapVueIcons --><scriptsrc="//unpkg.com/vue@2.6.12/dist/vue.min.js"></script><scriptsrc="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue-icons.min.js"></script></head>
Icon components
You can either uses individual icon components, or use the icon helper component <b-icon>, to place icons in your project templates.
All individual icon components are prefixed with the name <b-icon-{name}>, where {name} is one of the icon names listed in the Icons section above.
Note: when using <b-icon>, you must also import the required individual icon components, unless you are using the IconsPlugin or BootstrapVueIcons plugin.
Variants
By default, icons inherit the current text color of their parent element. All icon components provide a variant prop to apply one of the Bootstrap contextual text variant colors:
BootstrapVue icons provide several props for applying basic SVG transforms to the <svg>. All transforms can be combined for added effect. Note that the transforms are applied to the <svg>content and not the <svg> bounding box.
Flipping
Flip the icon horizontally and/or vertically via the flip-h and flip-v props.
Rotate the icon by a specified number of degrees via the rotate prop. Positive values will rotate the icon clockwise, while negative values will rotate the icon counterclockwise.
Note that any flipping is performed before the rotation is applied.
Scale
Scale the icon by any positive factor via the scale prop. Note this changes the icon's visual size but not its physical font size. To illustrate this we have added a background color to the icons.
If you need to have the background and/or border scale with the icon, use the font-scale prop instead.
Shifting
Shifting affects icon location without changing or moving the svg container. To move icons on the horizontal and/or vertical axis, use the shift-h and shift-v props with any arbitrary numeric value, including decimals.
For shift-v, positive values will move the icon upwards, while negative values will move the icon downwards. For shift-h, positive values will move the icon to the right, while negative values will move it left. Both props accept values that are in units of 1/16em (relative to the icon's current font size).
For clarity in the example, we’ve added a background color on the icon so you can see the effect.
Shifting is applied after any rotation transforms. As with scaling, backgrounds and borders are not affected. If you need to shift the border/background with the icon, use Bootstrap's margin spacing utility classes.
Animated icons
v2.7.0+
BootstrapVue includes the following built-in animations for icons:
'cylon' slides the icon left-right
'cylon-vertical' slides the icon up-down
'fade' fades the icon in and out 2.12.0+
'spin' smoothly spins the icon clockwise
'spin-reverse' smoothly spins the icon counter-clockwise
'spin-pulse' spins the icon clockwise, but in a pulsed step style
'spin-reverse-pulse' spins the icon counter-clockwise, but in a pulsed step style
'throb' scales the icon in and out 2.12.0+
To use the animation, set the animation prop to one of the animation names above.
The BootstrapVue defined icon animation effects require BootstrapVue's custom CSS. The animation prop translates to the class name b-icon-animation-{animationName}.
Need a different style animation? Just create a custom class defining the animation, and apply that class to the icon component, or create a new animation class in the form of b-icon-animation-{animationName} and pass the custom animation name to the animation prop.
Animation notes:
With the cylon animations, the left-right movement (or up-down movement) extends past the icon's bounding box by +/- 25%, so you may need to adjust padding or margins to compensate for your use case.
Combine icons together via the use of the component <b-iconstack> and the stacked prop on individual icons (<b-icon> or <b-icon-{icon-name}>) to create complex icons:
IE 11 does not support animation of child elements within an SVG, hence only the <b-iconstack> component can be animated. The child icon(s) animation will not be visible to IE 11 users.
Easily place icons as content in other components.
Note that icons placed in BootstrapVue components use BootstrapVue's custom CSS for additional styling compensation due to current issues with Bootstrap Icons <svg> alignment implementation, and for additional aesthetic scaling (icons placed in the components listed below will have their font scaled by 125%).
Buttons
<template><div><b-buttonsize="sm"class="mb-2"><b-iconicon="gear-fill"aria-hidden="true"></b-icon> Settings
</b-button><br><b-buttonvariant="primary"class="mb-2">
Pay now <b-iconicon="credit-card"aria-hidden="true"></b-icon></b-button><br><b-buttonvariant="outline-info"class="mb-2"><b-iconicon="power"aria-hidden="true"></b-icon> Logout
</b-button><br><b-buttonsize="lg"variant="primary"class="mb-2"><b-iconicon="question-circle-fill"aria-label="Help"></b-icon></b-button></div></template>
<template><div><b-input-groupsize="sm"class="mb-2"><b-input-group-prependis-text><b-iconicon="search"></b-icon></b-input-group-prepend><b-form-inputtype="search"placeholder="Search terms"></b-form-input></b-input-group><b-input-groupclass="mb-2"><b-input-group-prependis-text><b-iconicon="tag-fill"></b-icon></b-input-group-prepend><b-form-tagsseparator=" ,;"tag-variant="primary"placeholder="Enter new tags separated by space, comma or semicolon"no-add-on-enter
></b-form-tags></b-input-group><b-input-groupclass="mb-2"><b-input-group-prependis-text><b-iconicon="person-fill"></b-icon></b-input-group-prepend><b-form-inputtype="text"placeholder="User ID"></b-form-input></b-input-group><b-input-groupsize="lg"><b-input-group-prependis-text><b-iconicon="envelope"></b-icon></b-input-group-prepend><b-form-inputtype="email"placeholder="me@example.com"></b-form-input></b-input-group></div></template>
List Groups
Cras justo odio
Dapibus ac facilisis in
Morbi leo risus
Incididunt veniam velit
<template><b-list-group><b-list-group-itemclass="d-flex justify-content-between align-items-center"><b-iconicon="x-circle"scale="2"variant="danger"></b-icon>
Cras justo odio
</b-list-group-item><b-list-group-itemclass="d-flex justify-content-between align-items-center"><b-iconicon="exclamation-triangle-fill"scale="2"variant="warning"></b-icon>
Dapibus ac facilisis in
</b-list-group-item><b-list-group-itemclass="d-flex justify-content-between align-items-center"><b-iconicon="info-circle-fill"scale="2"variant="info"></b-icon>
Morbi leo risus
</b-list-group-item><b-list-group-itemclass="d-flex justify-content-between align-items-center"><b-iconicon="check-square"scale="2"variant="success"></b-icon>
Incididunt veniam velit
</b-list-group-item></b-list-group></template>
Dropdowns
Choose options
<template><div><b-dropdownvariant="primary"><template #button-content><b-iconicon="gear-fill"aria-hidden="true"></b-icon> Settings
</template><b-dropdown-item-button><b-iconicon="lock-fill"aria-hidden="true"></b-icon>
Locked <spanclass="sr-only">(Click to unlock)</span></b-dropdown-item-button><b-dropdown-divider></b-dropdown-divider><b-dropdown-groupheader="Choose options"class="small"><b-dropdown-item-button><b-iconicon="blank"aria-hidden="true"></b-icon>
Option A <spanclass="sr-only">(Not selected)</span></b-dropdown-item-button><b-dropdown-item-button><b-iconicon="check"aria-hidden="true"></b-icon>
Option B <spanclass="sr-only">(Selected)</span></b-dropdown-item-button><b-dropdown-item-button><b-iconicon="blank"aria-hidden="true"></b-icon>
Option C <spanclass="sr-only">(Not selected)</span></b-dropdown-item-button></b-dropdown-group><b-dropdown-divider></b-dropdown-divider><b-dropdown-item-button>Some action</b-dropdown-item-button><b-dropdown-item-button>Some other action</b-dropdown-item-button><b-dropdown-divider></b-dropdown-divider><b-dropdown-item-buttonvariant="danger"><b-iconicon="trash-fill"aria-hidden="true"></b-icon>
Delete
</b-dropdown-item-button></b-dropdown></div></template>
Working with SVGs
SVGs are awesome to work with, but they do have some known quirks to work around.
Focus handling is broken in Internet Explorer and Edge. We have added the attribute focusable="false" to the <svg> element. You can override this by setting the attribute focusable="false" on the icon component.
Browsers inconsistently announce SVGs as <img> tags with voice assistance. Hence, we have added added the attributes role="img" and alt="icon". You can override these attributes if needed.
Safari skips aria-label when used on non-focusable SVGs. As such, use the attribute aria-hidden="true" when using the icon and use CSS to visually hide the equivalent label.
Icons
Use the explorer below to search and browse the available icons.