# Args

Use the args shortcode to generates a table of structured arguments.

## Overview

Added in v0.22.0

Use the args shortcode to generate a table of structured arguments. The argument definitions are expected to be defined in a data file identified by a provided structure name.

```markdown
{{< args "args" >}}
```

## Data format

Arguments support the following elements:

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `comment` | string |  |  | Documentation about the argument. |
| `default` | string |  |  | Default value when no value is provided. |
| `deprecated` | string |  |  | Points to the version in which the argument was deprecated (it may include the `v` prefix). |
| `editors` | slice |  |  | Per-editor type hints and options. Each item specifies a CMS editor name and an optional type override and editor-specific options for that editor. Currently supported editor names: `cc` (CloudCannon). Takes precedence over type-based inference. |
| `name` | string | yes |  | Argument name. |
| `optional` | string |  |  | Flag to indicate if the argument is optional. |
| `options` | options |  |  | Conditional value requirements, depending on data type. |
| `parent` | select |  |  | Defines if the argument inherits a value from its parent. The value `cascade` indicates the child element should inherit the entire parent's value. When set to `merge`, the parent and child values are merged together separated by a space character. Supported values: [`cascade`, `merge`]. |
| `release` | string |  |  | Points to the version in which the argument was released (it may include the `v` prefix). |
| `type` | string | yes |  | Data type of the argument, either a primitive or complex type. Supported primitive types are `bool`, `int`, `int64`, `float`, `float64`, `string`, `dict`, and `slice`. Complex types can either be a `dict` or a `slice` and should be defined in `data/_types.yml`. |

## Arguments

The shortcode supports both unnamed and named arguments.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | string |  |  | Name of the group filter. This is typically used when a shortcode and partial have common arguments. The group filter binds a specific argument to a particular group. By default, an argument belongs to all groups. |
| `header-level` | int |  | `3` | The header level to use for the user-defined type headers. |
| `page` | *hugolib.pageState | yes |  | Context of the current page. |
| `parent` | bool |  |  | Flag to filter only arguments that have a parent attribute (either `cascade` or `merge`). |
| `render-type` | select |  | `both` | Option whether to render arguments, user-defined types, or both. Please note that the arguments will render a link to a user-defined type in any case. Supported values: [`arguments`, `types`, `both`]. |
| `structure` | string | yes |  | Name of the data file that contains argument definitions. Supported data formats include JSON, TOML, YAML, and XML. You can omit the file extension. The file should reside in the `data/structures` folder. For bookshop components, add the `bookshop-` prefix to the structure name. |

