---
title: "Configuration"
description: "Module options under the formisch key."
canonical_url: "https://nuxt-formisch.onmax.me/getting-started/configuration"
---
# Configuration

> Module options under the formisch key.

Every option has a default that fits most apps, so this is optional.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['@nuxt/ui', 'nuxt-formisch'],
  formisch: {
    imports: true,
    components: true,
    prefix: 'F',
    autoForm: true,
  },
})
```

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        imports
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Auto-imports the Formisch composables, methods and types. Set <code>
        false
      </code>
      
       to import them from <code>
        @formisch/vue
      </code>
      
       yourself.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        components
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Registers <code>
        Form
      </code>
      
      , <code>
        Field
      </code>
      
       and <code>
        FieldArray
      </code>
      
       with <code>
        prefix
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        prefix
      </code>
    </td>
    
    <td>
      <code>
        'F'
      </code>
    </td>
    
    <td>
      Prefix for every component the module registers: <code>
        FForm
      </code>
      
      , <code>
        FField
      </code>
      
      , <code>
        FFieldArray
      </code>
      
      , <code>
        FAutoForm
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        autoForm
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
      
       when <code>
        @nuxt/ui
      </code>
      
       is in <code>
        modules
      </code>
    </td>
    
    <td>
      Registers <code>
        <FAutoForm>
      </code>
      
       and auto-imports <code>
        introspectSchema
      </code>
      
       and the <code>
        FieldConfig
      </code>
      
       / <code>
        ResolvedField
      </code>
      
       types. Setting it to <code>
        true
      </code>
      
       without Nuxt UI fails the build.
    </td>
  </tr>
</tbody>
</table>

`jsonToValibotSchema` in the app and `readValidatedFormBody` in `server/` are always auto-imported.

## Types

The module exports its public types for use outside auto-imported code:

```ts
import type { AutoFormThemeConfig, FieldConfig, FormIssue, ModuleOptions, ResolvedField } from 'nuxt-formisch'
```

Also exported: `FieldConstraints`, `FieldOption`, `FieldType`, `JsonToValibotSchemaOptions` and `FormValidationErrorData`.


## Sitemap

See the full [sitemap](https://nuxt-formisch.onmax.me/sitemap.md) for all pages.
