---
title: Share a component with the official repository
project: UI Builder
version: 1.0
section: development
language: en
license: MIT
url: https://totaljs.es/docs/uibuilder/1-0/development/share/
updated: 2026-11-19T11:56:16.260Z
---

# Share a component with the official repository

> Prepare a component for the official repository and how the catalogue is built from it.

The official components live in the public GitHub repository [totaljs/uibuildercomponents](https://github.com/totaljs/uibuildercomponents). When your component is useful to others, you can offer it there, and after it is accepted it appears in **Import components** of every UI Builder.

## How the repository is organized

| Path | What it holds |
|---|---|
| `components/<id>/` | One folder for each component, with `editor.html`, `render.html` and `settings.html`. |
| `db.json` | The catalogue. |
| `db.js` | The script that builds `db.json` from the folders. |
| `cdn.js` | The script that prepares the published files. |

## Prepare your component

1. Name the folder after `exports.id`, in lowercase, for example `components/stepper/`.
2. Write each of `exports.id`, `exports.name`, `exports.group`, `exports.author`, `exports.icon`, `exports.version`, `exports.color`, `exports.type` and `exports.floating` that you use on one line that ends with a semicolon. The scripts read these lines one by one.
3. Write a `<readme>` in `editor.html`. It is copied into the catalogue and shown under **Read me**.
4. Put your name in `exports.author`.
5. Use `exports.render = 'auto'` and `exports.settings = 'auto'` with `render.html` and `settings.html`.
6. Refer to files of the component as `/components/<id>/<file>`.
7. Follow the coding standards that the repository links in its README.

## How the catalogue is built

`db.js` reads `editor.html` of every folder and writes `db.json`, sorted by name. Run it from the repository folder after `npm install total4`:

```bash
node db.js
```

`cdn.js` prepares the published files: it copies the folders, changes the paths `/components/<id>/` to the published address, and writes the catalogue with `type` and `floating`. It also writes the lists of the templates: `app.json` and `dashboard.json` with the components that have no `type` or name that type, and `flowboard.json` with the floating ones and those of type `flowboard`.

The published address of a component is:

```text
https://cdn.componentator.com/uibuilder/<id>/editor.html
```

## Offer it

Fork the repository on GitHub, add your component folder on a branch, and open a pull request with a short description of what the component does.

## Change a component later

Raise `exports.version` with every change, so that users can see which version they have.
