aura

Number

The Number component is a fancy number input. It behaves as a standard HTML number input, but it is styled to match the design system.

Attributes

  • name (String): The name of the input.
  • min (Number): The minimum value that the input will accept.
  • max (Number): The maximum value that the input will accept.
  • step (Number): The step value that the input will increment or decrement by.

Field Attributes

  • label (String): The label for the input.
  • description (String): A description of the input.
  • desc-end (String): A description that appears at the end of the input.

Basic Usage

Enter a number

Copy to clipboard

<aura:number value="0" label="Number" description="Enter a number" />

Small Variant

Enter a number

Copy to clipboard

<aura:number value="0" label="Number" description="Enter a number" sm />

With Min and Max

Copy to clipboard

<aura:number name="number" value="0" min="0" max="5" />

With Step

Copy to clipboard

<aura:number name="number" value="0" step="2" />

Readonly

Copy to clipboard

<aura:number name="number" value="0" readonly />

Disabled

Copy to clipboard

<aura:number name="number" value="0" disabled />