Guide
Okto Widgets
Open Okto Widget

Okto Bottomsheet is opened first when a new user authenticates with Okto and gets prompted to create wallet. Now if you want the user to access this bottom sheet again, Okto provides showWidgetSheet method to open the bottom sheet again.

Add Button to Open Bottom Sheet

Let's add a button in user-profile.tsx to open the bottom sheet.

user-profile.tsx
import { View, Button, Text } from 'react-native';
import { useOkto, type OktoContextType } from 'okto-sdk-react-native';
import React from 'react';
 
const UserProfileScreen = () => {
  const { showWidgetSheet } = useOkto() as OktoContextType;
 
  return (
    <View>
      <Text>User Profile</Text>
 
      ...
 
      <Button
        title="Open Okto Profile"
        onPress={() => {
          showWidgetSheet();
        }}
      />
    </View>
  );
};
 
export default UserProfileScreen;

Wallet Created

Profile

Community