Type

MatFormProps

@ng-forge/dynamic-forms-material

Material-specific props that can be set at form level and cascade to all fields.

This is the same type as MaterialConfig used in withMaterialFields(). Using a single type ensures consistency between library-level and form-level configuration.

The cascade hierarchy is: Library-level → Form-level → Field-level

Signature

type MatFormProps = MaterialConfig;

Properties

NameTypeDescription
appearance ?anyDefault appearance for Material form fields
subscriptSizing ?anyDefault subscript sizing for Material form fields
disableRipple ?boolean | undefinedWhether to disable ripple effects by default
color ?anyDefault color theme for form controls (checkboxes, radios, sliders, toggles)
labelPosition ?"before" | "after" | undefinedDefault label position for checkboxes and radios
floatLabel ?anyDefault float label behavior for form fields
hideRequiredMarker ?boolean | undefinedWhether to hide the required marker by default

Examples

const config: MatFormConfig = {
  defaultProps: {
    appearance: 'outline',
    subscriptSizing: 'dynamic',
    color: 'accent',
  },
  fields: [
    { type: 'mat-input', key: 'name', label: 'Name' },
  ],
};