> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-ui-builder/17.latest/collections/list-views/field-views.md).

# Field Views

Configuring Field Views in Umbraco UI Builder.

Field Views allow customization of the markup used by a field when displayed in a list view. Field Views are implemented as .NET Core View Components, which are passed a `FieldViewsContext` argument containing information about the entity/field being rendered.

## Defining a Field View

You can define a field view in one of two ways:

### Basic View File for the Built-In `FieldView` View Component

For field views, place a view file in the `/Views/Shared/Components/FieldView` folder with the following markup.

```csharp
@model Umbraco.UIBuilder.Web.Models.FieldViewContext
<!-- Insert your markup here -->
```

To register the view, pass the name of the view file (excluding the `.cshtml` file extension) to the relevant API method.

### Custom View Component

For more complex field views, create a custom view component class that can use dependency injection for any required dependencies. Use the following signature:

```csharp
// Example
public class MyComplexFieldViewViewComponent : ViewComponent
{
    public async Task<IViewComponentResult> InvokeAsync(FieldViewContext context)
    {
        // Do your custom logic here

        return View("Default", model);
    }
}
```

{% hint style="info" %} The `FieldViewContext` parameter in the `InvokeAsync` method **must** be named `context`. {% endhint %}

For the view component, place a `Default.cshtml` file into the `/Views/Shared/Components/MyComplexFieldView` folder with the following markup:

```csharp
@model Namespace.Of.Model.Returned.By.Custom.ViewComponent
<!-- Insert your markup here -->
```

## The Field View Context

Field view components are passed a `FieldViewContext` object with the following properties:

```csharp
public class FieldViewContext
{
    public string ViewName { get; set; }
    public object Entity { get; set; }
    public string PropertyName { get; set; }
    public object PropertyValue { get; set; }
}
```

## Setting the Field View of a List View Field

A field view is assigned to a list view field as part of the list view configuration. For more information, see the [List Views](/umbraco-ui-builder/17.latest/collections/list-views.md#setting-the-view-of-a-field) article.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/umbraco-ui-builder/17.latest/collections/list-views/field-views.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
