Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "animation"

Index

Interfaces

Functions

Functions

Const animation

  • Defines new @keyframes with given id and creates related class of same name to configure given animation opts. Only the duration option is given a default value (250ms), all others are optional.

    example
    css(
      animation(
        "fadein",
        { delay: "0.5s" },
        { opacity: 0 },
        { opacity: 1 }
      )
    );
    @keyframes fadein {
        0% {
            opacity: 0;
        }
        100% {
            opacity: 1;
        }
    }
    
    .fadein {
        animation-duration: 250ms;
        animation-name: fadein;
        animation-delay: 0.5s;
    }

    Parameters

    • id: string

      animation name

    • opts: Partial<AnimationOpts>

      animation config options

    • Rest ...keyframes: any

      keyframes

    Returns (any[] | RuleFn)[]

Generated using TypeDoc