dynamic-forms-material / TypeAlias

MatFormConfig

Generic types:TFields TValue

Material-specific FormConfig with type-safe defaultProps.

Use this type alias when defining form configurations with Material Design components to get IDE autocomplete and type checking for defaultProps.

Presentation

type MatFormConfig = FormConfig<TFields, TValue, MatFormProps>;

Example usage

const formConfig: MatFormConfig = {
  defaultProps: {
    appearance: 'outline',
    subscriptSizing: 'dynamic',
  },
  fields: [
    { type: 'mat-input', key: 'name', label: 'Name' },  // Uses form defaultProps
    { type: 'mat-input', key: 'email', props: { appearance: 'fill' } },  // Override
  ],
};