Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

InteractionInput

Struct
📦 Aspire.Hosting v17.0.0

Represents an input for an interaction.

type InteractionInput struct {
Name string `json:"Name"`
Label *string `json:"Label"`
Description *string `json:"Description"`
EnableDescriptionMarkdown *bool `json:"EnableDescriptionMarkdown"`
InputType InputType `json:"InputType"`
Required *bool `json:"Required"`
Options []any `json:"Options"`
Value *string `json:"Value"`
Placeholder *string `json:"Placeholder"`
AllowCustomChoice *bool `json:"AllowCustomChoice"`
Disabled bool `json:"Disabled"`
MaxLength *float64 `json:"MaxLength"`
AllowMultipleFiles *bool `json:"AllowMultipleFiles"`
FileFilter *string `json:"FileFilter"`
MaxFileSize *float64 `json:"MaxFileSize"`
}

Fields

Namestring
Gets or sets the name for the input. Used for accessing inputs by name from a keyed collection.
Label*stringoptional
Gets or sets the label for the input. If not specified, the name will be used as the label.
Description*stringoptional
Gets or sets the description for the input.
EnableDescriptionMarkdown*booloptional
Gets or sets a value indicating whether the description should be rendered as Markdown. Setting this to true allows a description to contain Markdown elements such as links, text decoration and lists.
InputTypeInputType
Gets or sets the type of the input.
Required*booloptional
Gets or sets a value indicating whether the input is required.
Options[]any
Gets or sets the options for the input. Only used by Choice inputs.
Value*string
Gets or sets the value of the input.
Placeholder*stringoptional
Gets the placeholder text for the input.
AllowCustomChoice*booloptional
Gets a value indicating whether a custom choice is allowed. Only used by Choice inputs.
Disabledbool
Gets or sets a value indicating whether the input is disabled.
MaxLength*float64optional
gets or sets the maximum length for text inputs.
AllowMultipleFiles*booloptional
Gets or sets a value indicating whether multiple files can be selected. Only used by File inputs.
FileFilter*stringoptional
Gets or sets the file type filter for File inputs. Uses the same format as the HTML accept attribute, e.g. ".pem,.pfx,.crt" or "image/*". When set, the file picker restricts selectable files. The CLI validates only dot-prefixed extension filters and does not validate MIME type patterns such as "image/*".
MaxFileSize*float64optional
Gets or sets the maximum file size in bytes for File inputs. If not specified, the server applies the configured upload limit (default 100 MB). When specified, the value is capped at the server-side upload limit.