Hinode logo
  • About 
  • Docs 
  • Components 
  • Guides 
  • Releases 
  •  
Docs
  • Getting Started
    • Introduction
    • Commands
    • Hosting and Deployment
    • Upgrading
    • Private Modules and Packages
    • Contribute
    • Troubleshooting
  • Content
    • Content Management
    • Content Organization
    • Typography
    • Links and Cross-References
    • Images and Figures
    • Tables
    • Icons
  • Configuration
    • Layout
    • Colors
    • Color Modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Cookie Consent
    • Digital Asset Managers
  • Components
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Args
    • Badge
    • Breadcrumb
    • Button
    • Button Group
    • Card
    • Card Group
    • Carousel
    • Collapse
    • Command Prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Ins
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and Tabs
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Table
    • Timeline
    • Toast
    • Tooltip
    • Video
  • Advanced Settings
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial Development
    • Module Development
    • Server Headers
    • Server-Side Redirection
  • About
    • Credits
    • License
  • Getting Started
    • Introduction
    • Commands
    • Hosting and Deployment
    • Upgrading
    • Private Modules and Packages
    • Contribute
    • Troubleshooting
  • Content
    • Content Management
    • Content Organization
    • Typography
    • Links and Cross-References
    • Images and Figures
    • Tables
    • Icons
  • Configuration
    • Layout
    • Colors
    • Color Modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Cookie Consent
    • Digital Asset Managers
  • Components
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Args
    • Badge
    • Breadcrumb
    • Button
    • Button Group
    • Card
    • Card Group
    • Carousel
    • Collapse
    • Command Prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Ins
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and Tabs
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Table
    • Timeline
    • Toast
    • Tooltip
    • Video
  • Advanced Settings
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial Development
    • Module Development
    • Server Headers
    • Server-Side Redirection
  • About
    • Credits
    • License

Animation

Share via
Hinode
Link copied to clipboard

Use the animation shortcode to show an After Effects animation.

On this page
Overview   Arguments   Configuration   Examples   Default Animation   Animation on Hover   Identification  

Overview  

Added in v0.20.4   

Use the animation shortcode to show an After Effects animation, powered by Lottie  . The Lottie library supports animations that have been exported as JSON with Bodymovin. The animation uses vector graphics and is responsive. The shortcode is a simplified wrapper of the Lottie library that provides basic functionality. As an example, the following shortcode shows an animation that plays when hovering the mouse over it.

markdown
{{< animation data="animation/gatin.json" auto=false hover=true class="col-6 mx-auto" >}}

Arguments  

The shortcode supports the following arguments:

Name Type Required Default Comment
auto bool true Flag to indicate the animation should start playing automatically.
class string Class attribute of the container element.
data string yes Path of the JSON file that contains the animation, relative to the static folder.
hover bool false Flag to indicate the animation should start playing when hovering the mouse over it.
id string Unique identifier of the animation element, defaults to lottie-animation-n with a sequential number n.
loop bool true Flag to indicate the animation should play in a loop.
mode bool Flag indicating if the animation should support color modes. If set, the shortcode searches for data files that having a matching color-mode suffix such as -light or -dark.
title string Accessibility title.
Name Type Required Default
auto bool true
Flag to indicate the animation should start playing automatically.
class string
Class attribute of the container element.
data string yes
Path of the JSON file that contains the animation, relative to the static folder.
hover bool false
Flag to indicate the animation should start playing when hovering the mouse over it.
id string
Unique identifier of the animation element, defaults to lottie-animation-n with a sequential number n.
loop bool true
Flag to indicate the animation should play in a loop.
mode bool
Flag indicating if the animation should support color modes. If set, the shortcode searches for data files that having a matching color-mode suffix such as -light or -dark.
title string
Accessibility title.

Configuration  

By default, animation support is optional. Be sure to include lottie in your Module Configuration and Page Frontmatter as needed.

Examples  

Change the behavior of your animation with shortcode arguments.

Default Animation  

Assign a valid path to data to provide a JSON file that contains the animation as input. The file should be stored in the static folder, or in one of its subfolders.

markdown
{{< animation data="animation/gatin.json" class="col-6 mx-auto" >}}

Animation on Hover  

Set auto to false and hover to true to trigger the animation when hovering the mouse over it.

markdown
{{< animation data="animation/gatin.json" auto=false hover=true class="col-6 mx-auto" >}}

Identification  

Assign a specific identified to the animation by setting the id argument. The following example assigns the id gatin-animation to the animation.

markdown
{{< animation id="gatin-animation" data="animation/gatin.json" class="col-6 mx-auto" >}}
• Update to Hinode v0.27.13 (b6f5054)
On this page:
Overview   Arguments   Configuration   Examples   Default Animation   Animation on Hover   Identification  
Animation
Animation
Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
Code licensed MIT, docs CC BY-NC 4.0
Currently v0.29.3
Privacy | Cookies
 
Links
Home 
About 
Docs 
Components 
Releases 
Guides
Getting Started 
Developing Modules 
Optimization 
Versioning 
Community
Issues   
Discussions   
Contribute 
Hinode
Code copied to clipboard