diff --git a/appkit/react-native/core/options.mdx b/appkit/react-native/core/options.mdx index 2a5597dcc..11ec5beb9 100644 --- a/appkit/react-native/core/options.mdx +++ b/appkit/react-native/core/options.mdx @@ -169,7 +169,7 @@ Allows you to toggle (enable or disable) additional features provided by AppKit. ### swaps -Enable or disable the swap feature in your AppKit. [Swaps](/appkit/react/transactions/swaps) feature is enabled by default. +Enable or disable the swap feature in your AppKit. [Swaps](/appkit/react-native/transactions/swaps) feature is enabled by default. ```ts createAppKit({ @@ -180,6 +180,19 @@ createAppKit({ }); ``` +### onramp + +Enable or disable the On-Ramp feature in your AppKit. [On-Ramp](/appkit/react-native/transactions/onramp) feature is enabled by default. + +```ts +createAppKit({ + //... + features: { + onramp: true, + }, +}); +``` + ### email This boolean defines whether you want to enable email login. This feature is enabled by default. diff --git a/appkit/react-native/transactions/onramp.mdx b/appkit/react-native/transactions/onramp.mdx new file mode 100644 index 000000000..ea7cfcb42 --- /dev/null +++ b/appkit/react-native/transactions/onramp.mdx @@ -0,0 +1,60 @@ +--- +title: On-Ramp +--- + +Enable users to purchase crypto with fiat directly within your React Native app using AppKit's On-Ramp feature. This integration allows users to securely access over 100 cryptocurrencies and purchase tokens to support in-app activity and transactions across multiple chains. + +## Configuration + +The On-Ramp feature is enabled by default in AppKit. Here's how to configure it in your app: + +```typescript +import { createAppKit } from '@reown/appkit...'; + +createAppKit({ + projectId: 'YOUR_PROJECT_ID', + // ... other config options + features: { + onramp: true, // Optional - true by default + } +}); +``` + +If you want to disable the On-Ramp feature, you can set `onramp: false` in the features configuration. + +## Usage + +### Opening the On-Ramp View + +You can programmatically open the On-Ramp view using the `useAppKit` hook: + +```typescript +import { useAppKit } from '@reown/appkit...'; + +function BuyButton() { + const { open } = useAppKit(); + + const handleBuyPress = () => { + open({ view: 'OnRamp' }); + }; + + return ( +