# Attributes

Source: https://docs.arcweave.com/project-items/attributes
Section: Project Items
Description: Storing information in boards, components, and elements using attributes

In Arcweave, **attributes** let you store information inside [boards](https://docs.arcweave.com/project-items/boards), [components](https://docs.arcweave.com/project-items/components), and [elements](https://docs.arcweave.com/project-items/elements). Board and component attributes can also provide scoped variables for your story logic.

The following attribute types are available on boards, components, and elements:

- Rich Text Field
- String Field
- Component List
- Asset List

Boards and components additionally support these variable-compatible attribute types:

- Boolean
- Integer
- Float

Attributes are particularly useful when you [integrate](https://docs.arcweave.com/integrations/overview) your story with other platforms or game engines. Attribute content does not render automatically in Play Mode. However, String Field, Boolean, Integer, and Float board and component attributes can be read and changed through Arcscript, and their values appear in the [Debugger](https://docs.arcweave.com/project-tools/play-mode/debugger).

## General structure

Context: Arcweave docs > Project Items > Attributes > General structure

All types of attributes follow the same basic structure: a _Label-Content_ pair.

The label is the human-readable name of the attribute. The content is its value, whose data type depends on the attribute type.

## String field

Context: Arcweave docs > Project Items > Attributes > String field

Use string fields to store single-line, plain text values, like words, numbers, or short phrases. Example cases of the string field include the following:

**Component attributes**:

- A character's aliases, e.g. `Nickname`: `Yardbird`
- A character's ability scores, e.g. `Charisma`: `12`
- A weapon's damage die, e.g. `Damage`: `1d4`
- A spell's specifications, e.g. `Duration`: `3 rounds`

**Element attributes**:

- Setting an element as starting (or ending) dialogue, e.g. `dialogue`: `start`
- Tagging an element with properties required for a storylet or an event to trigger, e.g. `storylet`: `foo`

Boards and components treat String Field attributes as scoped variables. Use the dedicated **Integer** or **Float** type when you need a numeric value. Elements do not support numeric attribute types; use a string field for numeric element metadata.

These fields are particularly useful when [integrating](https://docs.arcweave.com/integrations/overview) with other platforms, as they don't contain any HTML tags.

## Rich text field

Context: Arcweave docs > Project Items > Attributes > Rich text field

Use rich text attributes when you want to store long, detailed, or formatted content in a board, component, or element attribute. Example cases of the rich text field include the following:

- **Descriptions**: Write a short description for your character or location.
- **Backstory**: Keep characters' backstories in their components for easy access.

Rich Text attributes support basic formatting options such as **bold**, _italic_, <ins>underline</ins>, and ~~strikethrough~~. You can also include [mentions](https://docs.arcweave.com/project-tools/mentions) to reference components and boards in your project.

> ⚠️ Do not confuse a rich text attribute of an element with the element's main content. Attributes are for internal use only and do _not_ appear in [Play Mode](https://docs.arcweave.com/project-tools/play-mode/overview).

## Component lists

Context: Arcweave docs > Project Items > Attributes > Component lists

Use component lists when you need to attach an array of components to a board, component, or element.

> ✅ Elements include a primary component list, visible in Play Mode, which is created by dragging a component directly into the element. Additional component lists can be added as element attributes; however, these are metadata only and do _not_ render in Play Mode.

You can use this to list items and relations, as in the following examples:

- **Character inventory**: add the items carried (as components) into a character's component.
- **Spellbook**: list the spells they know.
- **Character relations**: list other characters that have important relations to the component character.
- **Contents**: in a location's component, list the items or characters found there.

Component lists also have a **label field**, so name each of them according to your needs.

![An open component showing the component list attribute: a component list is used as an inventory list storing the item components the character is carrying.](https://docs.arcweave.com/assets/component-lists.Bq4qdfvh.jpg)

The attached components appear with their thumbnail. Click on the thumbnail to open the attached component.

## Asset lists

Context: Arcweave docs > Project Items > Attributes > Asset lists

Use asset lists when you need to attach an array of image, audio, or video assets to a board, component, or element.

> ✅ Elements already have their unique cover (image or video asset) and their attached audio clips (audio assets), which appear in Play Mode. Still, asset list attributes allow you to add additional image, audio, and video references as metadata, although they are not visible in Play Mode.

The image below shows an element with all 4 types of attributes.

![Screenshot showing the open element properties modal, featuring all 4 types of element attributes. First, there is a component list called "Locations" that has two components. Then, there is a string attribute called "Year of construction" that has the value "1562." Third, an audio list called "Audio files" that has 3 audio files. Finally, a rich text attribute called "Backstory" that tells the backstory of the castle.](https://docs.arcweave.com/assets/element-attributes.-YEd--m5.png)

## Access attributes

Context: Arcweave docs > Project Items > Attributes > Access attributes

To create, edit, or delete an attribute, first open the item's attributes interface.

### Board attributes dialog

Context: Arcweave docs > Project Items > Attributes > Access attributes > Board attributes dialog

To access a board's attributes, right-click a regular board in the **Boards** section and select **Attributes**. Boards that already have attributes also display an attributes button next to their name.

### Component attributes panel

Context: Arcweave docs > Project Items > Attributes > Access attributes > Component attributes panel

To access a component's attributes, do the following:

1. Locate the component:
   - **Sidebar**: In the **Components** section
   - **Current board**: In an element where it is attached
2. Click the component to open its attributes panel.

### Element attributes panel

Context: Arcweave docs > Project Items > Attributes > Access attributes > Element attributes panel

To access an element's attributes, do the following:

1. Locate the element on your board.
2. Right-click the element and choose **Properties**.
3. In the Properties modal, switch to the **Attributes** tab, to reveal its attributes panel.

## Scoped variable attributes

Context: Arcweave docs > Project Items > Attributes > Scoped variable attributes

A String Field, Boolean, Integer, or Float attribute on a board or component becomes an Arcscript variable when the attribute and its owner have custom IDs. These are called [board variables](https://docs.arcweave.com/project-items/variables/board) and [component variables](https://docs.arcweave.com/project-items/variables/component).

The Arcscript reference combines two IDs:

- The owning board or component's **custom ID** is the scope.
- The attribute's **custom ID** is the variable name.

For example, an integer attribute with custom ID `health` on the component `hero` is referenced as `hero.health`:

```arcscript
${ hero.health -= 10 }
${ show(hero.health) }
```

The attribute label can be more descriptive and does not affect the Arcscript reference. Rich Text Field, Component List, and Asset List attributes remain metadata even if their exported data contains a `customId`.

Arcweave generates a custom ID when you create a regular board or component. When you name a variable attribute, Arcweave generates its custom ID from its label. To edit an attribute custom ID, open its three-dot menu and select **Edit Custom ID**. To edit the scope, select the custom ID beneath a board title or component name. Renaming an ID updates existing Arcscript references automatically.

### Custom ID rules

Context: Arcweave docs > Project Items > Attributes > Scoped variable attributes > Custom ID rules

See [Variable names and custom IDs](https://docs.arcweave.com/project-items/variables/overview#variable-names-and-custom-ids) for the syntax, uniqueness, and reserved-name rules shared by global, board, and component variables.

## Create attributes

Context: Arcweave docs > Project Items > Attributes > Create attributes

After opening the relevant attributes interface, do either of the following:

- To add an attribute at the end of the list, click **Add attribute** below the attributes and select the type you want to create.
- To add an attribute after an existing one:
  1. Hover the mouse cursor over the existing attribute.
  2. Open its **three-dot menu** and select **Add Attribute**.
  3. Select the type of attribute you want to create from the menu. The newly created attribute will appear below the clicked one.

On boards and components, variable-compatible types appear in the **Variables** group of the type menu. **Integer** and **Float** are under **Number** in that group.

## Edit attributes

Context: Arcweave docs > Project Items > Attributes > Edit attributes

To edit an attribute, open the relevant attributes interface, then do either of the following:

- **Label**: Click the attribute's label, type the new label, and press **Enter** or click outside the attribute.
- **Content**: Click the attribute's content and edit its value. For component and asset lists, see [Add to list attributes](https://docs.arcweave.com/project-items/attributes#add-to-list-attributes).

On board and component variable attributes, the label is only a human-readable description. Changing it does not change the attribute's custom ID, so existing Arcscript references keep working. To change how Arcscript references the attribute, [edit its custom ID](https://docs.arcweave.com/project-items/attributes#scoped-variable-attributes) instead.

## Add to list attributes

Context: Arcweave docs > Project Items > Attributes > Add to list attributes

### Component lists

Context: Arcweave docs > Project Items > Attributes > Add to list attributes > Component lists

To add a component to a component list, do the following:

1. Open the relevant attributes interface.
2. Locate the component list attribute you want to use.
3. In the **Components** section of the sidebar, find the component you want to attach.
4. Drag and drop it into the component list.

To share a listed component, right-click its reference and select **Copy link**. The link opens the referenced component's dialog. See [Copy a component link](https://docs.arcweave.com/project-items/components#copy-a-component-link).

You can also **reorder components** within a list or **move them between lists** by dragging and dropping.

### Asset lists

Context: Arcweave docs > Project Items > Attributes > Add to list attributes > Asset lists

To add an asset to an asset list, do the following:

1. Open the relevant attributes interface.
2. Locate the asset list attribute you want to use.
3. In the **Assets** section of the sidebar, find the asset you want to attach.
4. Drag and drop it into the asset list.

You can also **reorder assets** within a list or **move them between lists** by dragging and dropping.

## Resize attributes

Context: Arcweave docs > Project Items > Attributes > Resize attributes

By default, attributes span the **full width** of their interface, but you can resize an attribute to span only **half-width** and vice-versa.

To resize an attribute, do the following:

1. Hover the mouse cursor over it.
2. Open the **three-dot menu** at the top right.
3. Select **Resize**.

## Reorder attributes

Context: Arcweave docs > Project Items > Attributes > Reorder attributes

To reorder an attribute, do the following:

1. Click and hold it from the **dots icon** that appears at its top left corner when you hover over it.
2. Drag and release it above or below another attribute.

## Delete attributes

Context: Arcweave docs > Project Items > Attributes > Delete attributes

To delete an attribute, do the following:

1. Hover the mouse cursor over it.
2. Open the **three-dot menu** at the top right.
3. Select **Delete**.
