Skip to main content


Provides an input field for integer values, validating that user input is a valid integer, and showing error if not.
Shows by default a small button to multiply input's value * 10^18 to transform to wei.

IntegerInput Example


import { IntegerInput } from "~~/components/scaffold-eth";


const [txValue, setTxValue] = useState<string | bigint>("");

onChange={updatedTxValue => {
placeholder="value (wei)"


PropTypeDefault ValueDescription
valuestringundefinedThe data that your input will show.
onChangefunctionundefinedA callback invoked when the amount in the input changes.
placeholder (optional)stringundefinedThe string that will be rendered before input data has been entered.
name (optional)stringundefinedHelps identify the data being sent if InputBase is submitted into a form.
error (optional)booleanfalseWhen set to true, changes input border to have error styling.
disabled (optional)booleanfalseWhen set to true, changes input background color and border to have disabled styling.