# Text value

Learn how to define textual content.

This content type defines static or dynamic text values such as titles, colors, and URLs for [text schemas](/reference/content/schema/types/text).

## Examples

Here are some examples of static and dynamic content:

**Static**

```pmsjson
{
  "type": "text",
  "value": {
    "type": "static",
    "value": "Hello, world!"
  }
}
```

**Dynamic**

```pmsjson
{
  "type": "text",
  "value": {
    "type": "dynamic",
    "expression": "location's cityName",
    "default": "Unknown"
  }
}
```

**Nullable**

```pmsjson
{
  "type": "text",
  "value": {
    "type": "dynamic",
    "expression": "location's cityName",
    "nullable": true,
    "default": null
  }
}
```

## Properties

These are the properties common to static and dynamic values:

- `type`: `string`

  The type of attribute. Always `text` for text values.

- `value`: `StaticValue|DynamicValue` (see [StaticValue](#static-properties), [DynamicValue](#dynamic-properties))

  The definition of the value.

### Static properties

The following properties are available for static values:

- `type`: `string`

  The type of the value. Always `static` for static values.

- `value`: `string`

  The value itself.

  > **Good to know**
  >
  > You can use [placeholders](/reference/content/definition/placeholders) to insert values from other attributes into the text.

### Dynamic properties

The following properties are available for dynamic values:

- `type`: `string`

  The type of the value. Always `dynamic` for dynamic values.

- `expression`: `string`

  The [CQL expression](/reference/cql/expressions/basics) that evaluates to the value.

- `nullable`: `boolean` (default: )

  Whether the value can be `null`.

  This value must match the [`optional`](/reference/content/schema/types/structure#attribute-optional-prop) property of the associated attribute. In other words, if the attribute is optional, then the value is nullable.

- `default`: `string|null` (optional)

  The default value to use when the evaluation fails, results in `null`, or produces an incompatible type.
