Skip to content

Instantly share code, notes, and snippets.

Last active February 11, 2017 18:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kevanmoothien/cf9904e7825a29b5d92513ba475f6f65 to your computer and use it in GitHub Desktop.


Click on the link below and add the codes in a visualforce component name "spinner" or any other name that sound best for you

Basic usage

Include the Visualforce component on the Visualforce page you want to use the spinner/loading like in the code below.

  <c:spinner />
Displaying the spinner

To display the spinner, a JavaScript code must be executed. Here are the code

km_spin(true); // to show the spinner
km_spin(false); // to hide the spinner

Advanced usage

Customizing the spinner

You can further customize the Spinner by adding some attributes such as in the code below:

    <c:spinner spinner_name="wave"  spinner_color="red" />

Possible value for "spinner_name" are:

  • rotating-plane
  • wave
  • wandering-cubes
  • spinner-pulse
  • double-bounce
  • chasing-dots
  • three-bounce
  • circle
  • cube-grid
  • fading-circle
  • folding-cube

Value for "spinner_color" is a hex or html color name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment