---
title: Create a component
project: UI Builder
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/uibuilder/1-0/guides/create-component/
updated: 2026-11-19T08:01:41.353Z
---

# Create a component

> Write a new component in the built-in code editor.

**Create** opens a code editor with the source of a small sample component, a clock. You change it into your own component.

![The Edit source-code form with the sample component](/files/JapWsP2EN61f.webp)

## Create a component

**1.** Select **Import components** at the top of the component list, and then **Create**.

**2.** Change the source. The lines at the top set how the component appears in the list:

- `exports.name`: the name, for example `'Clock'`;
- `exports.group`: the group in the list, for example `'Controls'`;
- `exports.icon`: the icon, for example `'ti ti-clock'`.

**3.** Select **SUBMIT**.

The component appears in the list under its group. Drag it onto the canvas like any other component.

The component is saved inside your design file. To use it in another design, export it. See [Manage the component list](../component-list/).

Writing component code needs JavaScript. The [official components](https://github.com/totaljs/uibuildercomponents) are good examples.
