Using Input Number
Files
Basic Usage
import { useInputNumber } from './components/InputNumber';
const MyComponent = () => {
const inputNumber = useInputNumber();
const onEnterAmount = async () => {
const result = await inputNumber.show({
title: "How many?",
value: 1,
min: 1,
max: 99
});
if (result !== null) {
console.log("User entered:", result);
} else {
console.log("User cancelled");
}
};
return <button onClick={onEnterAmount}>Set Amount</button>;
};Options (InputNumberOptions)
InputNumberOptions)Property
Type
Description
Integration with RPG Maker MZ
Input Behavior
Last updated