---
title: setSpaceNameFormat
slug: viewer-2d/methods/setSpaceNameFormat
docTags: 
createdAt: 2024-02-21T14:33:53.990Z
---

Sets the name format displayed for spaces.

## Example

::codepen{url="https://codepen.io/Catenda/embed/JjQMGyV"}

## Usage

```javascript
const format = "regular";

viewer2d.setSpaceNameFormat(format);
```

```javascript
const format = "long";

viewer2d.setSpaceNameFormat(format);
```

## Parameters

### format

Valid display format values are:

- `'regular'`
- `'long'`

| **Type** | **Required** |
| -------- | ------------ |
| String   | Yes          |

