---
url: "https://vueda.dev/v3/reference/api/vue/ViewAction.md"
title: "ViewAction"
---

# ViewAction

## Overview

Full-page view for executing a model action. Renders a page title with a "Go Back" button and embeds a
ModelActionForm for the specified app, model, and action. Accepts an optional primary key and initial form
values to pre-populate the form.

Theme entry: [ViewAction](/v3/reference/theming/keys/ViewAction.md)

## Props

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="prop-themeOverride">themeOverride</span> | `Object` |  | `null` | A partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants. |
| <span id="prop-app">app</span> | `string` | yes |  | Django app label that owns the model. |
| <span id="prop-model">model</span> | `string` | yes |  | Django model name the action belongs to. |
| <span id="prop-pk">pk</span> | `string\|number\|array` |  | `undefined` | Primary key(s) of the object(s) to act on; pass an array for multi-object actions. |
| <span id="prop-action">action</span> | `string` | yes |  | Name of the action to execute. |
| <span id="prop-title">title</span> | `string` |  | `undefined` | Page title override. The default title is the start-cased action name followed by the model's verbose name. When `pk` lists more than one object, the default uses the verbose plural name. The default is empty until the verbose name is known, so the layout shows a skeleton. |
| <span id="prop-initialFormValues">initialFormValues</span> | `object` |  | `undefined` | Initial field values pre-populated into the action form. |

## Slots

### `return-button` {#slot-return-button}

Scoped slot.

#### Bindings

| Name | Description |
| --- | --- |
| <span id="slot-return-button-param-label">label</span> |  |

### `default` {#slot-default}

Scoped slot.

#### Bindings

| Name | Description |
| --- | --- |
| <span id="slot-default-param-action">action</span> |  |
| <span id="slot-default-param-app">app</span> |  |
| <span id="slot-default-param-formContext">formContext</span> |  |
| <span id="slot-default-param-model">model</span> |  |
| <span id="slot-default-param-pk">pk</span> |  |

## Source

`client/lib/views/ViewAction.vue`
