An animated loader graphic module.
Install via NPM.
npm install rocket-loader
NOTE that this module has a dependency Rocket Tools (28kb) which will automatically be installed as well.
Start by including the necessary files.
<!-- Your content goes here -->
Remove Loader<!-- Scripts -->
See the different options you have available on module call.
||Set the HTML target. Can also be an element.|
||Append the loader to the
||NOTE that an empty value will display no text.|
||Set the loader colour.|
||0||Set a delay (in seconds) on the loader showing.|
||Set the size of the loader and its padding.|
||Set the loader type.|
You can also overwrite the options globally by altering the Rocket defaults. To do so reference the defaults object property, for example:
Rocketdefaultsloaderbody = 'Loading';Rocketdefaultsloadertype = 'dots';
In order to rebuild production files you will first need to install the Rocket Command Line Tool. To do so run the following npm command in your terminal. NOTE that this package is installed globally and can take a while as it has quite a few dependencies.
npm install rocket-command -g
Once installed navigate to the Rocket Loader root and run the following command:
The relevant minified CSS and JS will now be rebuilt.
Created and maintained by Chris Humboldt
Copyright and License
Copyright 2018 Rocket Project
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.