Skip to content

Usage

For Gueleton to work properly, you must pass the following three parameters:

  1. data-key: A unique string key to identify the data source
  2. data: The data source object
  3. loading: A boolean value indicating whether to show the skeleton screen

Additionally, Gueleton provides a scoped variable named data in the default slot, representing pre-stored data or the original data. You need to use this variable to render your content, like this:

When the page is first rendered, the remotely fetched data and data-key will be stored in the .gueleton/index.json file.

In subsequent page loads, Gueleton will prioritize using the pre-stored data from .gueleton/index.json to render the default slot content, then generate skeleton screens based on DOM elements.

In addition to the three required parameters above, all global options mentioned in the installation section can also be used in components.

Here’s a complete example: