# Relevant Cardscript iconInput.Number

Cardscript

Allows a user to enter a number.

# Example

{
  "type": "AdaptiveCard",
  "body": [
    {
      "id": "number",
      "type": "Input.Number",
      "placeholder": "Input.Number",
      "spacing": "medium"
    }
  ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.0"
}

# Required properties

# id

Unique identifier for the value. Used to identify collected input when the Submit action is performed.

  • Type: string

# type

Must be "Input.Number".

  • Type: string
  • Values:
    • Input.Number

# Optional properties

# max

Hint of maximum value (may be ignored by some clients).

  • Type: number

# min

Hint of minimum value (may be ignored by some clients).

  • Type: number

# placeholder

Description of the input desired. Displayed when no selection has been made.

  • Type: string

# value

Initial value for this field.

  • Type: number

# spacing

Controls the amount of spacing between this element and the preceding element.

  • Type: string
  • Values:
    • none
    • small
    • default
    • medium
    • large
    • extraLarge
    • padding

# separator

When true, draw a separating line at the top of the element.

  • Type: boolean

# JSON Schema

{
  "additionalProperties": true,
  "type": "Input.Number",
  "description": "Allows a user to enter a number.",
  "allOf": [
    {
      "$ref": "#/definitions/CardElement"
    }
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the value. Used to identify collected input when the Submit action is performed."
    },
    "max": {
      "type": "number",
      "description": "Hint of maximum value (may be ignored by some clients)."
    },
    "min": {
      "type": "number",
      "description": "Hint of minimum value (may be ignored by some clients)."
    },
    "placeholder": {
      "type": "string",
      "description": "Description of the input desired. Displayed when no selection has been made."
    },
    "type": {
      "type": "string",
      "description": "Must be `\"Input.Number\"`.",
      "enum": [
        "Input.Number"
      ]
    },
    "value": {
      "type": "number",
      "description": "Initial value for this field."
    }
  },
  "required": [
    "type",
    "id"
  ],
  "typeSafe": "input-number",
  "example": "FIXME!",
  "propertySummary": [
    {
      "name": "id",
      "type": "string",
      "required": "Required",
      "text": "Unique identifier for the value. Used to identify collected input when the Submit action is performed."
    },
    {
      "name": "max",
      "type": "number",
      "required": "Optional",
      "text": "Hint of maximum value (may be ignored by some clients)."
    },
    {
      "name": "min",
      "type": "number",
      "required": "Optional",
      "text": "Hint of minimum value (may be ignored by some clients)."
    },
    {
      "name": "placeholder",
      "type": "string",
      "required": "Optional",
      "text": "Description of the input desired. Displayed when no selection has been made."
    },
    {
      "name": "type",
      "type": "string",
      "required": "Required",
      "text": "Must be `\"Input.Number\"`."
    },
    {
      "name": "value",
      "type": "number",
      "required": "Optional",
      "text": "Initial value for this field."
    }
  ]
}
Last Updated: 9/10/2023, 11:30:14 AM