-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spinning icons #4720
spinning icons #4720
Comments
As a workaround, one can apply a CSS transform animation to spin (or scale) the icon via a custom class applied to the icon component If the feature is added, the animations should respect the The CSS classes should also be name-spaced with the .b-icon {
&.bi-spin {
animation: bicon-spin 2s infinite linear;
}
&.bi-pulse {
animation: bicon-spin 1s infinite steps(8);
}
} And the duration of the animation could be set via SASS variables. Note that the prefixed properties will automatically be added by |
Another option we might be able to do is allow b-spinner to accept custom content via the default slot to spin or throb. one could do: <b-spinner label="Spinning star">
<b-icon icon="star-fill"></b-icon>
</b-spinner> This might be the simplest approach, since the spin and grow (throb) animations already exist in Bootstrap V4 CSS. And it would allow users to spin almost anything. It would just need a few minimal CSS/Style overrides |
Problem
Spinning icons are a great way of providing feedback to the user. Currently this library doesn't provide a way to do this.
Proposed Solution
add
spin
andpulse
props to b-icon, if truthy, they should addbi-spin
orbi-pulse
classes to the svg element.add appropriate css rules to those classes, see fontawesome styles below
Alternatives
Everyone implements this themselves
Additional context
The css rules would look something like this:
Would love to have a go at preparing a PR for this if this feature seems desirable.
The text was updated successfully, but these errors were encountered: