Docs
/
Components
/
AmountInput

AmountInput

Component to input amount. Beautiful formating so it's easy for your user to input amount.

import { AmountInput } from "@wizard-ui/react";

Usage

import { useState } from "react";
import { AmountInput } from "@wizard-ui/react";

function App() {
  const [value, setValue] = useState("");

  return <AmountInput value={value} onChange={setValue} />;
}

label (optional)

You can specify a max. Useful to avoid issues.

import { useState } from "react";
import { AmountInput } from "@wizard-ui/react";

function App() {
  const [value, setValue] = useState("");

  return <AmountInput label="Amount" value={value} onChange={setValue} />;
}

max (optional)

You can specify a max. Useful to avoid issues.

import { useState } from "react";
import { AmountInput } from "@wizard-ui/react";

function App() {
  const [value, setValue] = useState("");

  return <AmountInput value={value} onChange={setValue} max="100" />;
}
Yeti Labs 2022 © yetilabs.io