# Getting Started

&#x20;To use **ng-mat-forms** define the application class as follows:

{% tabs %}
{% tab title="form.component.ts" %}

```typescript
import {NgMatFormOptions,NgMatFormFields} from 'ng-mat-forms';
// other imports here...

export class MyTestApp {

    public ngMatFormsOptions: NgMatFormOptions = {
        column: 3
        // other options...
    };

    // Initialized a field list array which extended a field interface.
    public ngMatFormFields: NgMatFormFields[] = [{
        type: 'input',
        label: 'User Name',
        placeholder: 'Enter a User Name',
        formControlName: 'name'
        // other options...
    }, {
        type: 'select',
        label: 'Password',
        placeholder: 'Enter a Password',
        formControlName: 'password',
        list: [
            {
                name: 'Infinity War',
                value: 'Avengers',
                type: 'option'
            },
            {
                name: 'End Game',
                value: 'Avengers',
                type: 'option'
            }
        ]
        // other options...
    }];

    constructor() { }
}  
```

{% endtab %}

{% tab title="form.component.html" %}

```markup
<ng-mat-forms [Fields]='ngMatFormFields' 
[options]='ngMatFormsOptions'></ng-mat-forms>
```

{% endtab %}
{% endtabs %}

and you're ready to use.
