Appearance
@swapped/connect-sdk / react / UseAmountInputOptions
Type Alias: UseAmountInputOptions
UseAmountInputOptions =
object
Defined in: src/react/amount-input/useAmountInput.ts:16
Options for useAmountInput.
Properties
balanceAmount?
optionalbalanceAmount?:number|null
Defined in: src/react/amount-input/useAmountInput.ts:33
Hard ceiling: raw (aggregated) balance. When set, values above it produce above_balance.
formatValue?
optionalformatValue?: (value) =>string
Defined in: src/react/amount-input/useAmountInput.ts:41
Decorates min/max/balance in default error messages ($10.00, 0.5 USDC).
Parameters
value
number
Returns
string
maxAmount?
optionalmaxAmount?:number|null
Defined in: src/react/amount-input/useAmountInput.ts:28
Soft / spendable ceiling (e.g. balance minus fee reserve). When set, values above it produce above_spendable.
maxAmountMode?
optionalmaxAmountMode?:MaxAmountMode
Defined in: src/react/amount-input/useAmountInput.ts:39
Which ceiling blocks submit. Soft above_spendable is a warning only in 'balance' mode when balanceAmount is also supplied. Defaults to 'balance'.
maxDecimals?
optionalmaxDecimals?:number
Defined in: src/react/amount-input/useAmountInput.ts:21
Max fraction digits passed to sanitizeAmountInput. Omit for no limit (crypto). 0 forces integers.
minAmount?
optionalminAmount?:number|null
Defined in: src/react/amount-input/useAmountInput.ts:23
Optional minimum. When set, values below it fail validation.
touchedDelay?
optionaltouchedDelay?:number
Defined in: src/react/amount-input/useAmountInput.ts:46
Delay in ms before blur marks the field touched. Delay before marking the field touched on blur. Defaults to 0.