@@ -297,7 +297,7 @@ With the use of Bootstrap's border and background
297297<!-- icons-styling.vue -->
298298```
299299
300- ## Transforms
300+ ## SVG transforms
301301
302302BootstrapVue icons provide several props for applying basic SVG transforms to the ` <svg> ` . All
303303transforms can be combined for added effect. Note that the transforms are applied to the ` <svg> `
@@ -428,6 +428,64 @@ Shifting is applied after any rotation transforms. As with scaling, backgrounds
428428affected. If you need to shift the border/background with the icon, use Bootstrap's margin
429429[ spacing utility classes] ( /docs/reference/utility-classes ) .
430430
431+ ## Animated icons
432+
433+ <span class =" badge badge-info small " >v2.7.0+</span >
434+
435+ BootstrapVue includes two spinning animation options for icons: ` spin ` and ` pulse ` . Both animations
436+ spin the icon clockwise, but pulse uses a stepped spin. A third animation called ` cylon ` is also
437+ provided.
438+
439+ To use the spin animation, set the ` animation ` prop to one of the animation names ` 'spin' ` ,
440+ ` 'pulse' ` or ` 'cylon' ` .
441+
442+ ``` html
443+ <template >
444+ <div >
445+ <p >Spinning animation:</p >
446+ <b-icon icon =" arrow-clockwise" animation =" spin" font-scale =" 4" ></b-icon >
447+
448+ <p class =" mt-3" >Pulsing animation:</p >
449+ <b-icon icon =" arrow-clockwise" animation =" pulse" font-scale =" 4" ></b-icon >
450+
451+ <p class =" mt-3" >Cylon animation:</p >
452+ <b-icon icon =" three-dots" animation =" cylon" font-scale =" 4" ></b-icon >
453+ </div >
454+ </template >
455+
456+ <!-- b-icon-spin-aminations.vue -->
457+ ```
458+
459+ Note with the ` cylon ` animation, the left-right movement extends past the icon's bounding box by
460+ ` 25% ` , so you may need to adjust padding or margins to compensate for your use case.
461+
462+ As the animations are CSS based, they are applied _ after_ any SVG transforms have taken place:
463+
464+ ``` html
465+ <template >
466+ <div class =" p-4" >
467+ <b-icon icon =" clock" animation =" spin" font-scale =" 4" shift-v =" 8" ></b-icon >
468+ </div >
469+ </template >
470+
471+ <!-- b-icon-spin-aminations-transforms.vue -->
472+ ```
473+
474+ The BootstrapVue defined icon animation effects require BootstrapVue's custom CSS. The ` animation `
475+ prop translates to the class name ` b-icon-animation-{animationName} ` .
476+
477+ Need a different style animation? Just create a custom class defining the animation, and apply that
478+ class to the icon component, or create a new animation class in the form of
479+ ` b-icon-animation-{animationName} ` and pass the custom animation name to the ` animation ` prop.
480+
481+ ** Note:** The BootstrapVue defined animation effects of this component is dependent on the
482+ ` prefers-reduced-motion ` media query. See the
483+ [ reduced motion section of our accessibility documentation] ( /docs/reference/accessibility ) for
484+ additional details.
485+
486+ Side note: the ` cylon ` animation gets its name from the "eye" of the Cylons from the _ original_
487+ [ 1978 Battlestar Galactica TV series] ( https://www.youtube.com/watch?v=5a5bEIf0UaU ) .
488+
431489## Stacking icons
432490
433491<span class =" badge badge-info small " >v2.3.0+</span >
@@ -492,6 +550,8 @@ Stacked icon notes:
492550- The ` font-scale ` prop cannot be used on the inner icon components
493551- The ` width ` and ` height ` attributes cannot be applied to the inner icon components
494552- Stacked icons ** cannot** be stacked inside another ` <b-iconstack> `
553+ - Note the animation props on the child icons will have no effect, however you _ can_ use the
554+ animation props on the ` <b-iconstack> ` component.
495555
496556## Using in components
497557
0 commit comments