React SDK
The @swipelux/onramp-react
package provides a simple way to embed the Swipelux on-ramp widget into your React application.
This package was designed to work with Next.js and other server-side rendering frameworks out of the box as well.
Integration steps
Add the component to your app
The Swipelux On-Ramp widget is rendered using the <SwipeluxWidget/>
component.
You're all set!
You've now integrated the Swipelux On-Ramp widget into your React app.
Visit your app and confirm that the widget is displayed correctly.
Next steps
We've only covered the basics of how to integrate the Swipelux On-Ramp widget into your React application.
If you're using a server-side integration and create orders using our REST API, then you should use the orderToken
prop in the SwipeluxWidget
component to initiate the widget with a prepared order.
To learn more about orderToken
and other supported widget settings, please refer to the Supported widget settings article.