TokenInput
The TokenInput component is an input field with support for user balances, half / max buttons, and number formatting.
Installation
1. Install shadcn/ui input and button components
Use shadcn/ui CLI or manually install the input and button components.
2. Install SolanaUI TokenCombobox
The TokenInput component requires the TokenCombobox
component. Copy the code below to src/components/sol/token-combobox.tsx
.
3. Install SolanaUI TokenInput
Copy the code below to src/components/sol/token-input.tsx
.
4. Use TokenInput
Import the TokenInput
component and use it in your app.