Skip to main content
An example is hosted here, and reference to the code can be found here.

How to Use Turnkey EWK

To use the embedded wallet kit effectively, your project is required to:
  1. Use Next.js 13+ with the /app directory structure to leverage server actions.
  2. Import Turnkey’s default styles in your layout.tsx or equivalent entry point:
  3. Set up environment variables in your .env file to configure API connections and optional OAuth providers.
Environment Variables:

1. Authentication with the Auth Component

The Auth component provides authentication functionality, including email, passkey, phone, and social logins. Usage Example:
Your component should look like the below
auth

2. Importing and Exporting Wallets

The Import and Export components allow users to import or export wallets securely. Import Wallet Example:
Export Wallet Example:
Your components should look like the below
export
Import
import

3. Optional: Customizing Themes with TurnkeyThemeProvider

The TurnkeyThemeProvider allows you to apply custom styles using CSS variables. This is optional and can be used to customize Turnkey components to match your application’s design. Usage Example:
You can customize any CSS variable used by Turnkey components. For the full list of available variables, refer to the this .css file Below is an example of a dark mode theme.
auth with theme