---
title: Text
project: CMS
version: 1.0
section: widgets
language: en
license: MIT
url: https://totaljs.es/docs/cms/1-0/widgets/text/
updated: 2026-11-20T06:51:42.966Z
---

# Text

> Widgets for headings, paragraphs, messages, code and short facts.

Widgets for headings, paragraphs, messages, code and short facts. Click a text in the visual editor and choose **Edit** to write your own.

![Headline, Paragraph 2, Alert and Code highlighter on a public page](/files/Jaq7ZG4k161f.webp)

## API

### headline.html

Type: `component`

A heading with a paragraph below it.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `h` | `String` | no | `h1` | **Heading**: the level of the heading, `h1`, `h2` or `h3`. |
| `align` | `String` | no | `left` | **Align**: `left`, `center` or `right`. |
| `maxwidth` | `String` | no | `auto` | **Paragraph max. width**: `auto`, or a width such as `50%` or `300px`. |

You can **Duplicate** the paragraph to add more. The file in the repository also offers **Justify** for **Align**.

### paragraph.html

Type: `component`

One or more paragraphs of text.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `align` | `String` | no | `left` | **Align**: `left`, `center`, `right` or `justify`. |

Choose **Duplicate** on a paragraph to add another one.

### paragraph2.html

Type: `component`

A short bold title with one or more paragraphs.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `align` | `String` | no | `left` | **Align**: `left`, `center`, `right` or `justify`. |

Choose **Duplicate** on a paragraph to add another one.

### alert.html

Type: `component`

A coloured box with a short message.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `size` | `String` | no | `medium` | **Size**: `small`, `medium` or `large`. |
| `align` | `String` | no | `left` | **Align**: `left`, `center` or `right`. |
| `color` | `String` | no | `color1` | **Choose a color**: one of the four swatches. |

The four colours are yellow (`color1`), red (`color2`), green (`color3`) and blue (`color4`).

### codehighlighter.html

Type: `component`

A block of source code with coloured syntax.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `language` | `String` | no |  | The language of the code, such as `js` or `html`. Leave it empty or enter `auto` to detect it. |

The text keeps its line breaks. On the public site the colours come from the highlight.js library, which CMS loads from `cdnjs.cloudflare.com` on every page while the widget is installed. In the editor the code appears without colours.

### keyvalue.html

Type: `component`

Pairs of a name and a value, such as opening hours or product facts.

Choose **Duplicate** on a pair to add another one. The widget has no settings of its own.
