React
React version of Pay Button is the wrapper for the javascript version. For more detailed information about the API, please check the javascript documentation. The documentation for the javascript version also applies directly to the React version.
How to install React components:
npm install @getpip/react-pip-button
import { PIPButton } from "@getpip/react-button"
const PIPPage: React.FC = () => {
return (
<div>
<PIPButton
receiver="..."
amount={1}
chainNetwork="..."
asset="..."
/>
</div>
)
}
Name | Required | Type | Default Value |
---|---|---|---|
receiver | true | string | null |
amount | true | string | null |
currency | true | string | ‘USDC’ |
chainNetwork | false | string | ‘SOLANA’ |
label | false | string | ‘PAY’ |
useLabel | false | boolean | true |
buttonColor | false | string | ‘#1149FF’ |
buttonTextColor | false | string | ‘#FFFFFF’ |
onLoad | false | function | null |
onPayment | false | function | null |
onError | false | function | null |
Last modified 6mo ago