hyTags
HomeHome DocumentationDocumentation

style-animate

Animates style changes made within the commands block over a specified duration
Parameter
Type
Description
duration
Number?
The animation duration in seconds (defaults to 0.15 if not specified)
return
Type?
Optional return value from the commands block
commands
Commands
The commands block containing style changes to animate
return
void
A promise that resolves when the animation completes
Test Case:Animate style change
    <div></div>
    
    <style-animate duration="0.01">
      <style-set name="opacity" value="0.5">
    </style-animate>
    <style-get name="opacity">
    <assert-equal value="0.5" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed