# Options (/docs/guides/options)

Make thresholds and lists configurable, and read them in conditions and messages.



Options make one rule reusable with different values. Declare each in `options`, with a type, a default and a description:

```json
"options": {
  "min": { "type": "number", "default": 25, "description": "Lowest allowed scale, in percent." },
  "includeAudio": { "type": "boolean", "default": true, "description": "Also check audio clips." },
  "allow": { "type": "string[]", "default": ["AE.ADBE Crop"], "description": "Match names allowed to repeat." }
}
```

| Type       | Holds                                        |
| :--------- | :------------------------------------------- |
| `number`   | a number                                     |
| `string`   | a string                                     |
| `boolean`  | `true` or `false`                            |
| `number[]` | a list of numbers                            |
| `string[]` | a list of strings                            |
| `json`     | any JSON value, read by computed scopes only |

The default must have the declared type. Change an option's value by editing the rule (see [Custom rules](/docs/guides/custom-rules#override-a-built-in-rule)).

## Reading an option [#reading-an-option]

An option is the field `options.<name>`. Use it as a value in a condition, as a placeholder in a message, or in `data`:

```json
{
  "condition": { "field": "clip.scale", "operator": "lessThan", "value": { "field": "options.min" } },
  "message": "Clip \"{clip.name}\" is scaled to {clip.scale} %, below {options.min} %."
}
```

## List options [#list-options]

A list option is the value of `in` or `notIn`, and nothing else:

```json
{ "field": "effect.matchName", "operator": "notIn", "value": { "field": "options.allow" } }
```

## A switch for part of a rule [#a-switch-for-part-of-a-rule]

A boolean option that turns a part of the rule on or off is an alternative in the condition. The built-in [Tiny clips](/docs/rules/no-tiny-clips) rule checks audio clips only when `includeAudio` is on:

```json
{
  "any": [
    { "field": "clip.trackType", "operator": "equals", "value": "video" },
    { "field": "options.includeAudio", "operator": "equals", "value": true }
  ]
}
```

Add it to the check's `all` with the other conditions.
