--- tags: Vue, Component --- # Vue - Bootstrap-vue icon Component. ## How to * find element [carbon/icons-vue] https://bootstrap-vue.org/docs/icons#icons-1 ![](https://i.imgur.com/oTh2Snk.png) * for example find **"arrow-up"** icon * Note that the keyword should be vue style. * for compoment **BIcon{IconName}** such as **BIconArrowUp** * for template **<b-icon-{icon-name}>** such as **<b-icon-arrow-up>** ![](https://i.imgur.com/P2RAeBp.png) * import and setup ``` import { BIconArrowUp } from 'bootstrap-vue'; export default { components { ... BIconArrowUp, ... }, ``` * use element ``` <template> <div class="h2 mb-0"> <b-icon-arrow-up></b-icon-arrow-up> </div> </template> ``` * result ![](https://i.imgur.com/7hREdcR.png) ## Advance ### Sizing https://bootstrap-vue.org/docs/icons#sizing * Changed as current font-size. ``` <template> <div> <p class="h1 mb-2">Icon <b-icon icon="exclamation-circle-fill"></b-icon></p> <p class="h2 mb-2">Icon <b-icon icon="exclamation-circle-fill"></b-icon></p> <p class="h3 mb-2">Icon <b-icon icon="exclamation-circle-fill"></b-icon></p> <p class="h4 mb-2">Icon <b-icon icon="exclamation-circle-fill"></b-icon></p> <p class="h5 mb-2">Icon <b-icon icon="exclamation-circle-fill"></b-icon></p> </div> </template> ``` ![](https://i.imgur.com/oRo0uzp.png) * Changed with **style**. ``` <template> <div> <b-icon icon="exclamation-circle" style="width 120px; height 120px;"></b-icon> </div> </template> ``` ![](https://i.imgur.com/3ewGVyk.png) * Changed as current font-scale. ``` <template> <div> <b-icon icon="camera" font-scale="0.5"></b-icon> <b-icon icon="camera" font-scale="1"></b-icon> <b-icon icon="camera" font-scale="2"></b-icon> <b-icon icon="camera" font-scale="3"></b-icon> <b-icon icon="camera" font-scale="4"></b-icon> <b-icon icon="camera" font-scale="5"></b-icon> <b-icon icon="camera" font-scale="7.5"></b-icon> </div> </template> ``` ![](https://i.imgur.com/5rWn4m2.png) ### Styling https://bootstrap-vue.org/docs/icons#styling ### SVG transforms https://bootstrap-vue.org/docs/icons#svg-transforms * Flipping * Rotate * Scale * Shifting ### Animated icons https://bootstrap-vue.org/docs/icons#animated-icons ### Stacking icons https://bootstrap-vue.org/docs/icons#stacking-icons ### Used in components https://bootstrap-vue.org/docs/icons#using-in-components * Button * Button Group * Input * List * Dropdowns ## ref: * https://bootstrap-vue.org/docs/icons