Animations

Animate elements, or sub elements to a container. You can choose from multiple predefined effects, defined by the styleguide. All animations in done with anime-js.


Warning: Element "h2" and variant "subtitle" cannot be combined. Heading elements must use a heading variant. in /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php on line 52

Effects

  • fade
  • fadeUp (Left, Right, Down)
  • bounce

Warning: Element "h3" and variant "subtitle" cannot be combined. Heading elements must use a heading variant. in /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php on line 52

Bind

Two types of bind can be done, they are the following:

  • Scroll: Will animate in and out near the edges of the viewport (compatible with modern browsers)
  • Onload: Will animate on load of the page.

Warning: Element "h4" and variant "subtitle" cannot be combined. Heading elements must use a heading variant. in /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php on line 52

Other

All animations will be triggerd automatically when toggling display: none, display: block.


Warning: Element "h4" and variant "subtitle" cannot be combined. Heading elements must use a heading variant. in /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php on line 52

Library

We have chosen anime.js to create advanced animations swiftly. Like all javascript animation librarys it's always as performant that you would want. Therefore this library should be utilized where css-animations can't create the same effect.

<!-- typography.blade.php   original: p -->
<p class="c-typography c-typography__variant--p" data-uid="662942881df86">
    Animate elements, or sub elements to a container. You can choose from multiple predefined effects, defined by the styleguide. All animations in done with anime-js.
</p>
            <br />
<b>Warning</b>:  Element "h2" and variant "subtitle" cannot be combined. Heading elements must use a heading variant. in <b>/var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php</b> on line <b>52</b><br />
<!-- typography.blade.php   original: h4 -->
<h2 class="c-typography c-typography__variant--h2" data-uid="662942881e027">
    Effects
</h2>
            <!-- listing.blade.php -->
    <ul class="c-listing" data-uid="662942881e10f">

                    
                                                <li class="c-listing__item c-listing__item-0">
                                                <span class="c-listing__label">
                                                            fade
                                                    </span>
                         
                    </li>
                                                
                                                <li class="c-listing__item c-listing__item-1">
                                                <span class="c-listing__label">
                                                            fadeUp (Left, Right, Down)
                                                    </span>
                         
                    </li>
                                                
                                                <li class="c-listing__item c-listing__item-2">
                                                <span class="c-listing__label">
                                                            bounce
                                                    </span>
                         
                    </li>
                                    
        </ul>
    
            <br />
<b>Warning</b>:  Element "h3" and variant "subtitle" cannot be combined. Heading elements must use a heading variant. in <b>/var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php</b> on line <b>52</b><br />
<!-- typography.blade.php   original: h4 -->
<h3 class="c-typography c-typography__variant--h3" data-uid="662942881e696">
    Bind
</h3>
            <!-- typography.blade.php   original: p -->
<p class="c-typography c-typography__variant--p" data-uid="662942881e6d9">
    Two types of bind can be done, they are the following:
</p>


            <!-- listing.blade.php -->
    <ul class="c-listing" data-uid="662942881e70b">

                    
                                                <li class="c-listing__item c-listing__item-0">
                                                <span class="c-listing__label">
                                                            Scroll: Will animate in and out near the edges of the viewport (compatible with modern browsers)
                                                    </span>
                         
                    </li>
                                                
                                                <li class="c-listing__item c-listing__item-1">
                                                <span class="c-listing__label">
                                                            Onload: Will animate on load of the page. 
                                                    </span>
                         
                    </li>
                                    
        </ul>
    
            <br />
<b>Warning</b>:  Element "h4" and variant "subtitle" cannot be combined. Heading elements must use a heading variant. in <b>/var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php</b> on line <b>52</b><br />
<!-- typography.blade.php   original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="662942881e867">
    Other
</h4>
            <!-- typography.blade.php   original: p -->
<p class="c-typography c-typography__variant--p" data-uid="662942881e8a8">
    All animations will be triggerd automatically when toggling display: none, display: block.
</p>


            <br />
<b>Warning</b>:  Element "h4" and variant "subtitle" cannot be combined. Heading elements must use a heading variant. in <b>/var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Typography/Typography.php</b> on line <b>52</b><br />
<!-- typography.blade.php   original: h4 -->
<h4 class="c-typography c-typography__variant--h4" data-uid="662942881e8fa">
    Library
</h4>
        <!-- typography.blade.php   original: p -->
<p class="c-typography c-typography__variant--p" data-uid="662942881e92f">
    We have chosen anime.js to create advanced animations swiftly. Like all javascript animation librarys it's always as performant that you would want. Therefore this library should be utilized where css-animations can't create the same effect.
</p>

Attributes

Animate elements, or sub elements to a container. You can choose from multiple predefined effects, defined by the styleguide. All animations in done with anime-js.

Blade component parameters

Attributes Description Values
js-bind Event to bind on (onload = init animation, scroll = in view animation) scroll/onload
js-action Animate keyword for animations. animate
js-animate-target A sub element of the bound target, if left blank bound target will be animated. The target element is automatically prefixed by the dom-node of the bound element. li.list-element
js-animate-type Type of animation fade/fadeUp/fadeLeft/bounce
js-animate-stagger Stagger (delay) each item in list of items (ms). Use 0 or false to turn off staggering. 300
js-animate-time Time to complete animation. 50