@@ -127,7 +127,7 @@ Vue.use(BootstrapVueIcons)
127127BootstrapVue icons SCSS/CSS does not depend on any Bootstrap SASS variables, mixins, functions or
128128CSS classes (other than the Bootstrap ` text-{variant} ` text color utility classes, if using the
129129` variant ` prop). Please note that the icons CSS is _ also_ included in the main BootstrapVue SCSS/CSS
130- files.
130+ files. Animations effects require BootstrapVue custom SCSS/CSS.
131131
132132### Browser
133133
@@ -439,18 +439,32 @@ affected. If you need to shift the border/background with the icon, use Bootstra
439439
440440BootstrapVue includes the following built-in animations for icons:
441441
442+ - ` 'cylon' ` slides the icon left-right
443+ - ` 'cylon-vertical' ` slides the icon up-down
444+ - ` 'fade' ` fades the icon in and out <span class =" badge badge-info small " >2.12.0+</span >
442445- ` 'spin' ` smoothly spins the icon clockwise
443446- ` 'spin-reverse' ` smoothly spins the icon counter-clockwise
444447- ` 'spin-pulse' ` spins the icon clockwise, but in a pulsed step style
445448- ` 'spin-reverse-pulse' ` spins the icon counter-clockwise, but in a pulsed step style
446- - ` 'cylon' ` slides the icon left-right
447- - '` cylon-vertical' ` slides the icon up-down
449+ - ` 'throb' ` scales the icon in and out <span class =" badge badge-info small " >2.12.0+</span >
448450
449451To use the animation, set the ` animation ` prop to one of the animation names above.
450452
451453``` html
452454<template >
453455 <b-row class =" text-md-center" >
456+ <b-col md =" 6" class =" mb-3" >
457+ <p >Cylon animation:</p >
458+ <b-icon icon =" three-dots" animation =" cylon" font-scale =" 4" ></b-icon >
459+ </b-col >
460+ <b-col md =" 6" class =" mb-3" >
461+ <p >Vertical cylon animation:</p >
462+ <b-icon icon =" three-dots-vertical" animation =" cylon-vertical" font-scale =" 4" ></b-icon >
463+ </b-col >
464+ <b-col md =" 6" class =" mb-3" >
465+ <p >Fade animation:</p >
466+ <b-icon icon =" star-fill" animation =" fade" font-scale =" 4" ></b-icon >
467+ </b-col >
454468 <b-col md =" 6" class =" mb-3" >
455469 <p >Spinning animation:</p >
456470 <b-icon icon =" arrow-clockwise" animation =" spin" font-scale =" 4" ></b-icon >
@@ -468,23 +482,15 @@ To use the animation, set the `animation` prop to one of the animation names abo
468482 <b-icon icon =" arrow-counterclockwise" animation =" spin-reverse-pulse" font-scale =" 4" ></b-icon >
469483 </b-col >
470484 <b-col md =" 6" class =" mb-3" >
471- <p >Cylon animation:</p >
472- <b-icon icon =" three-dots" animation =" cylon" font-scale =" 4" ></b-icon >
473- </b-col >
474- <b-col md =" 6" class =" mb-3" >
475- <p >Vertical cylon animation:</p >
476- <b-icon icon =" three-dots-vertical" animation =" cylon-vertical" font-scale =" 4" ></b-icon >
485+ <p >Throb animation:</p >
486+ <b-icon icon =" circle-fill" animation =" throb" font-scale =" 4" ></b-icon >
477487 </b-col >
478488 </div >
479489</template >
480490
481491<!-- b-icon-aminations.vue -->
482492```
483493
484- Note with the ` cylon ` animations, the left-right movement (or up-down movement) extends past the
485- icon's bounding box by ` +/- 25% ` , so you may need to adjust padding or margins to compensate for
486- your use case.
487-
488494As the animations are CSS based, they are applied _ after_ any SVG transforms have taken place:
489495
490496``` html
@@ -504,13 +510,18 @@ Need a different style animation? Just create a custom class defining the animat
504510class to the icon component, or create a new animation class in the form of
505511` b-icon-animation-{animationName} ` and pass the custom animation name to the ` animation ` prop.
506512
507- ** Note:** The BootstrapVue defined animation effects of this component is dependent on the
508- ` prefers-reduced-motion ` media query. See the
509- [ reduced motion section of our accessibility documentation] ( /docs/reference/accessibility ) for
510- additional details.
513+ ** Animation notes:**
511514
512- Side note: the ` cylon ` animation gets its name from the "eye" of the Cylons from the _ original_
513- [ 1978 Battlestar Galactica TV series] ( https://www.youtube.com/watch?v=5a5bEIf0UaU ) .
515+ - With the ` cylon ` animations, the left-right movement (or up-down movement) extends _ past_ the
516+ icon's bounding box by ` +/- 25% ` , so you may need to adjust padding or margins to compensate for
517+ your use case.
518+ - Animation durations can be [ configured via SASS SCSS variables] ( /docs/reference/theming )
519+ - The BootstrapVue defined animation effects of this component is dependent on the
520+ ` prefers-reduced-motion ` media query. See the
521+ [ reduced motion section of our accessibility documentation] ( /docs/reference/accessibility#reduced-motion )
522+ for additional details.
523+ - The ` cylon ` animation gets its name from the "eye" of the Cylons from the _ original_
524+ [ 1978 Battlestar Galactica TV series] ( https://www.youtube.com/watch?v=5a5bEIf0UaU ) .
514525
515526## Stacking icons
516527
@@ -572,7 +583,7 @@ available on individual icons.
572583
573584Stacked icon notes:
574585
575- - Remember to set the ` stacked ` prop on the inner icon components
586+ - Remember to set the ` stacked ` prop on the inner icon components!
576587- The ` font-scale ` prop cannot be used on the inner icon components
577588- The ` width ` and ` height ` attributes cannot be applied to the inner icon components
578589- Stacked icons ** cannot** be stacked inside another ` <b-iconstack> `
@@ -603,7 +614,7 @@ Individual icons within the icon stack can also be animated (except on IE 11):
603614 <b-icon
604615 stacked
605616 icon =" camera"
606- animation =" spin "
617+ animation =" throb "
607618 variant =" info"
608619 scale =" 0.75"
609620 ></b-icon >
@@ -644,20 +655,19 @@ font scaled by 125%).
644655<template >
645656 <div >
646657 <b-button size =" sm" class =" mb-2" >
647- <b-icon icon =" gear-fill" ></b-icon > Settings
658+ <b-icon icon =" gear-fill" aria-hidden = " true " ></b-icon > Settings
648659 </b-button >
649660 <br >
650661 <b-button variant =" primary" class =" mb-2" >
651- Pay now <b-icon icon =" credit-card" ></b-icon >
662+ Pay now <b-icon icon =" credit-card" aria-hidden = " true " ></b-icon >
652663 </b-button >
653664 <br >
654665 <b-button variant =" outline-info" class =" mb-2" >
655- <b-icon icon =" power" ></b-icon > Logout
666+ <b-icon icon =" power" aria-hidden = " true " ></b-icon > Logout
656667 </b-button >
657668 <br >
658669 <b-button size =" lg" variant =" primary" class =" mb-2" >
659- <b-icon icon =" question-circle-fill" aria-hidden =" true" ></b-icon >
660- <span class =" sr-only" >Help</span >
670+ <b-icon icon =" question-circle-fill" aria-label =" Help" ></b-icon >
661671 </b-button >
662672 </div >
663673</template >
0 commit comments