---
title: "au-widget-preflight/AuWidgetPreflightConfig | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-preflight.AuWidgetPreflightConfig/"
---

# au-widget-preflight/AuWidgetPreflightConfig

> Provides properties for the preflight widget.

## Classes

### AuWidgetPreflightConfig

For details, you can refer to the [Preflight widget](https://customerscanvas.com/dev/ui-framework/widgets/preflight.html) topic.
```json
{
  "widgets": [{
    "name": "preflight",
    "type": "preflight",
    "params": {
      "files": [ "http://example.com/printfiles/flyer.pdf" ],
      "config": {
        "backendUrl": "http://preflight.example.com",
        "startFromUploader": false,
        "product": {
          "dpi": 300,
          "size": {
            "width": 595,
            "height": 842
          },
          "bleed": 20,
          "safetyLines": `[{
            "color": "#00ff00",
            "altColor": "#00ff00",
            "margin": 40
          }]`
        },
        "rules": [
          {
            "type": "colorspace",
            "severity": "error",
            "enableFix": true,
            "params": {
              "allowedColorSpaces": [ "cmyk" ]
            }
          }
        ],
        ...
     },
     "onPageChange": [
       "{{ #function(page) page==='editor' && main.stepIndex === 0 ? main.nextStep() : ''  }}"
     ]
  }]
}
```

#### Constructors

##### Constructor

```ts
new AuWidgetPreflightConfig(): AuWidgetPreflightConfig;
```

###### Returns

[`AuWidgetPreflightConfig`](#auwidgetpreflightconfig)

#### Properties

##### config

```ts
config: any;
```

The preflight configuration. For details, see the [Config Reference](https://customerscanvas.com/dev/preflight/reference/config.html).

##### files

```ts
files: string[];
```

Initializes the widget with files for validation. For details, see the [F.A.Q.](https://customerscanvas.com/dev/preflight/howto/upload-files.html).

##### onError

```ts
onError: Function | Function[];
```

A function (`{{#function <expression>}}`) or an array of functions that work when errors occur in this widget.

##### onPageChange

```ts
onPageChange: Function | Function[];
```

A function (`{{#function <expression>}}`) or an array of functions that work when changing pages in this widget.

***

### PreviewModel

#### Constructors

##### Constructor

```ts
new PreviewModel(
   title, 
   url, 
   index): PreviewModel;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `title` | `string` |
| `url` | `string` |
| `index` | `number` |

###### Returns

[`PreviewModel`](#previewmodel)

#### Properties

##### index

```ts
index: number;
```

##### title

```ts
title: string;
```

##### url

```ts
url: string;
```
