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 ?MatFormFieldAppearanceDefault appearance for Material form fields
subscriptSizing ?SubscriptSizingDefault subscript sizing for Material form fields
disableRipple ?booleanWhether to disable ripple effects by default
color ?ThemePaletteDefault color theme for form controls (checkboxes, radios, sliders, toggles)
labelPosition ?"before" | "after"Default label position for checkboxes and radios
floatLabel ?FloatLabelTypeDefault float label behavior for form fields
hideRequiredMarker ?booleanWhether 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' },
  ],
};