Create component files

A component is made up of configuration and JavaScript files, which the Component Service uses to render the front end of your component, as well as the editing experience. This guide will step you through creating your component from scratch, explaining the purpose of each file.

Table of Contents

Create a components folder

  1. Create a folder called components.

    You can initialize this components folder as a GIT repository and store a collection of components in one repo.
  2. Inside the components folder, create a folder named after your component, for example, hello-world.

  3. Within the hello-world folder, create the following files. Read Component Service file structure for an explanation about what is in these files and what they are for:

    • manifest.json

    • main.js


    • preview-wrapper.html

      You will end up with a structure like this:

      This image shows the folder structure described above.