# Parameter field

> Learn how to document API parameters with Fern's ParamField component. Format types, requirements, defaults, and descriptions consistently.

The ParamField component documents API parameters and properties with consistent formatting for type, requirements, default values, and descriptions.

## Usage

<div>
  <div>
    <ParamField path="username" type="string" required={true}>
      The user's display name
    </ParamField>

    <ParamField path="limit" type="number" default="50">
      Maximum number of items to return
    </ParamField>
  </div>
</div>

```jsx Markdown
<ParamField path="username" type="string" required={true}>
  The user's display name
</ParamField>

<ParamField path="limit" type="number" default="50">
  Maximum number of items to return
</ParamField>
```

## Variants

### Deprecated parameter

<div>
  <div>
    <ParamField path="api_key" type="string" deprecated={true}>
      Use OAuth authentication instead
    </ParamField>
  </div>
</div>

```jsx Markdown
<ParamField path="api_key" type="string" deprecated={true}>
  Use OAuth authentication instead
</ParamField>
```

### Union types

<div>
  <div>
    <ParamField path="status" type="'active' | 'inactive' | 'pending'" default="active">
      The current status of the user account
    </ParamField>
  </div>
</div>

```jsx Markdown
<ParamField path="status" type="'active' | 'inactive' | 'pending'" default="active">
  The current status of the user account
</ParamField>
```

## Properties

<ParamField path="path" type="string" required={false}>
  The name of the parameter (e.g., "username", "limit")
</ParamField>

<ParamField path="type" type="string" required={true}>
  The data type of the parameter (e.g., "string", "number", "boolean")
</ParamField>

<ParamField path="required" type="boolean" required={false}>
  Indicates if the parameter is required. Displays a "Required" label when true.
</ParamField>

<ParamField path="default" type="string" required={false}>
  The default value for the parameter, if any
</ParamField>

<ParamField path="deprecated" type="boolean" required={false}>
  Marks the parameter as deprecated.
</ParamField>

<ParamField path="toc" type="boolean" required={false}>
  Whether to include the parameter in the table of contents. Defaults to `false`.
</ParamField>