Type

MatButtonField

@ng-forge/dynamic-forms-material

Signature

type MatButtonField<TEvent extends FormEvent> = ButtonField<MatButtonProps, TEvent>;

Type Parameters

NameConstraintDefaultDescription
TEventFormEvent--

Properties

NameTypeDescription
type "button"-
event FormEventConstructor<TEvent>-
eventArgs ?EventArgs | undefined

Optional arguments to pass to the event constructor. Can contain special tokens that will be resolved at runtime: - $key: The current field key - $index: The array index (if inside an array field) - $arrayKey: The parent array field key (if inside an array field) - $template: The template for array item creation (for array add buttons) - formValue: Access to the current form value for indexing

logic ?StateLogicConfig[] | undefinedLogic rules for dynamic disabled state (overrides form-level defaults)
key string

Unique field identifier used for form binding and value tracking.

This key is used to associate the field with form values and must be unique within the form. It follows object property naming conventions.

label ?DynamicText | undefined

Human-readable field label displayed to users.

Provides accessible labeling for form fields and is typically displayed above or beside the field input. Supports static strings, translation keys, Observables, and Signals for dynamic content.

props ?MatButtonProps | undefined

Field-specific properties and configuration options.

Contains type-specific configuration that varies based on the field type. The shape is defined by the TProps generic parameter.

meta ?FieldMeta | undefined

Native HTML attributes to pass through to the underlying element.

Contains attributes that are applied directly to the native input/element. Useful for accessibility, autocomplete hints, and custom attributes. The shape is defined by the TMeta generic parameter, which extends FieldMeta.

className ?string | undefined

Additional CSS classes for custom styling.

Space-separated string of CSS class names that will be applied to the field container for custom styling.

disabled ?boolean | undefined

Whether the field is disabled and cannot be interacted with.

When true, the field is rendered in a disabled state and cannot receive user input. The value can still be modified programmatically.

@value false

readonly ?boolean | undefined

Whether the field is read-only.

When true, the field displays its value but cannot be modified by user interaction. Differs from disabled in styling and accessibility.

@value false

hidden ?boolean | undefined

Whether the field is hidden from view.

When true, the field is not rendered in the UI. By default, validators on a hidden field are skipped — set {@link validateWhenHidden} to true (on the field, an ancestor, the form, or globally) to keep validation running while hidden. State logic and value derivations continue to apply.

@value false

tabIndex ?number | undefined

Tab index for keyboard navigation.

Controls the order in which fields receive focus when navigating with the Tab key. Follows standard HTML tabindex behavior.

excludeValueIfHidden ?boolean | undefined

Whether to exclude this field's value from submission output when hidden.

Overrides both the global withValueExclusionDefaults() and form-level FormOptions settings.

excludeValueIfDisabled ?boolean | undefined

Whether to exclude this field's value from submission output when disabled.

Overrides both the global withValueExclusionDefaults() and form-level FormOptions settings.

excludeValueIfReadonly ?boolean | undefined

Whether to exclude this field's value from submission output when readonly.

Overrides both the global withValueExclusionDefaults() and form-level FormOptions settings.

validateWhenHidden ?boolean | undefined

Whether to run validation when this field is hidden — statically (hidden: true), via a hidden logic rule, or via any hidden ancestor.

When false, all validators on this field (built-in like required/email/min, custom validate()/expression validators, and required state logic) are skipped while the field is hidden. The hidden state, disabled state, readonly state, and value derivations continue to apply.

Inherited from the parent field — once a field overrides this value, all of its descendants inherit the new value unless they override in turn. Form-level FormOptions.validateWhenHidden is the root inherited value, falling back to the global default.

col ?number | undefined

Column sizing configuration for responsive grid layout.

Specifies how many columns this field should span in a 12-column grid system. Supports responsive behavior and field arrangement.

wrappers ?readonly WrapperConfig[] | null | undefined

Wrapper components to chain around this field.

- undefined — inherit auto-associations + form defaults. - null — render bare (see skipAuto/skipDefaults for partial opt-out). - readonly WrapperConfig[] — merged innermost with auto + defaults. - [] is not an opt-out; inherits like undefined.

skipAutoWrappers ?boolean | undefined

Skip the auto-association layer (WrapperTypeDefinition.types) while keeping form-level defaults and any field-level wrappers. Use when a global wrapper auto-applies to this field type but isn't wanted here.

skipDefaultWrappers ?boolean | undefined

Skip the form-level defaultWrappers layer while keeping auto-associations and any field-level wrappers.

addons ?readonly AnyAddon[] | undefined

Addons rendered inside this field's slots (typically prefix / suffix).

Each addon declares its kind, slot, and kind-specific configuration. Whether a field type accepts addons — and which slots / kinds — is declared at registration via FieldTypeDefinition.addons. Field types without that registration ("Tier 3", e.g., toggle, radio) drop any addons value with a lenient warning at config init.