> For the complete documentation index, see [llms.txt](https://docs.valtimo.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valtimo.nl/reference/list-with-tags.md).

# List with tags

The CarbonListComponent supports rendering tags within its data rows. Tags can be typed, changing their color. The TagType type is defined in the Carbon library. To enable this the following steps must be followed:

1. Add ViewType.TAGS to the column config:

   **`sample.component.ts`**

   ```typescript
   ...
   import {ColumnConfig, ViewType, CarbonListItem} from '@valtimo/components';
   ...

   // For custom templates, the fields need to be set after the view was initialized
   export class SampleComponent {
   ...
   public fields: Array<ColumnConfig> = [
       {
         viewType: ViewType.TAGS,
         key: 'title',
         label: 'sample.translation.title',
       },
       {
           viewType: ViewType.TAGS,
           template: this.sampleTemplate,
           key: 'tags',
           label: 'Tags',
       },
     ];

   //
   public items: Array<CarbonListItem> = [
     {
       title: 'Title 1',
       tags: [
         {
           content: 'tag1',
           type: 'purple'
         },
         {
           content: 'tag2',
           type: 'red'
         },
       ]
     }
   ]
   ...
   }
   ```
2. Add handler for action:

   **`sample.component.html`**

   ```angular2html

   <valtimo-carbon-list
       [items]="items"
       [fields]="fields"
   ></valtimo-carbon-list>
   ...
   ```

This will create a list with tags in a row:

![list-with-tags.png](/files/ySFepXs2M6fkwMZt0nu4)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valtimo.nl/reference/list-with-tags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
