# AmountInput (/docs/products/dash-dots/reference/components/amount-input)

Keep amounts in minor units, as Monime's API does, and pass them to `dash.payments.request` as they are.

**Children:** Nothing

## Example

![The AmountInput component](/assets/images/dash-dots/components/amount-input.webp)

```xml title="view.dml"
<AmountInput label="Amount" value="{{ amount }}" onChange="setAmount" />
```

```ts title="controller.ts"
export default definePage({
  initialState: { amount: 15000 },
  mutations: {
    setAmount: (_state, event: ValueEvent<number | null>) => ({ amount: event.detail.value }),
  },
});
```

## Props

| Prop          | Type             | What it is                                                                    |
| ------------- | ---------------- | ----------------------------------------------------------------------------- |
| `value`       | `number`         |                                                                               |
| `currency`    | `string`         | The ISO 4217 code shown before the amount. Default: `SLE`.                    |
| `minorUnits`  | `number`         | Digits after the decimal point. Default: the currency's own, 2 for SLE.       |
| `unit`        | `minor`, `major` | With `minor`, 150 is SLE 1.50. With `major`, 1 is SLE 1.00. Default: `minor`. |
| `label`       | `string`         |                                                                               |
| `placeholder` | `string`         |                                                                               |
| `hint`        | `string`         | Help shown under the field, which `error` replaces.                           |
| `error`       | `string`         | Shown under the field in red, in place of `hint`.                             |
| `disabled`    | `boolean`        | Dims it, and the person can't use it.                                         |

## Events

| Event      | Sends                   | Notes                                       |
| ---------- | ----------------------- | ------------------------------------------- |
| `onChange` | `{ value }` in `detail` | The amount in `unit`, or `null` when empty. |
