Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Interfaces

Functions

Functions

transistClass

  • transistClass(element: HTMLElement, duration: number, options?: TransistClassOptions): Promise<HTMLElement>
  • This helper can be used to create nice css transitions. The general idea is stolen from https://vuejs.org/v2/guide/transitions.html#Transition-Classes but without the limitation on vue js / the forced usage on v-if therefore.

    The rest is basically the same. You define a dom element and a duration (how long your animation should take -> we do not parse your css for the animation length)

    First we add a class called h-enter and a class called h-enter-active. After one tick/frame the h-enter class will be removed and only the h-enter-active class remains until the duration is up. After that both classes will be removed again.

    In addition to that you can set a "targetClass" which is added in the same frame when the h-enter class is removed from the element. Finally you can specify a "removeClass" which is removed on the last frame/tick of the transition

    Parameters

    Returns Promise<HTMLElement>

Generated using TypeDoc