Introduction
The Basics
- Login / Signup
- Chains / Networks
- Embedded Wallets
- Server Wallets
- Smart Accounts (AA)
- External Wallets
- Users / VC's
- Design
- Money & Funding
Beyond The Basics
- Using Wallets
- Headless
- Global Identity
- Global Wallets
- Wallet Connect Global Connectivity
- Bridge Widget
- Rate Limits
Developer Dashboard
- SDK and API Keys
- Sandbox vs Live
- Analytics
- User Management
- Test Accounts
- Settings
- Admin
- Webhooks
- Configuring Social Providers
Migrating to Dynamic
- Migrating to Dynamic
- Migration Tutorials
For Wallets & Chains
Hackathons
Legacy Embedded Wallets
Tutorials
Wallet List Views Tutorial
Below is an example showcasing the setup for tabs that categorize wallets by blockchain network, utilizing both custom and predefined filter functions:
Copy
Ask AI
import {
DynamicContextProvider,
FilterChain,
} from "@dynamic-labs/sdk-react-core";
import {
BitcoinIcon,
EthereumIcon,
FlowIcon,
SolanaIcon,
} from "@dynamic-labs/iconic";
const App = () => {
return (
<DynamicContextProvider
settings={{
environmentId: "env-id",
// Additional settings...
overrides: {
views: [
{
type: "wallet-list",
tabs: {
items: [
{
label: { text: "All chains" },
},
{
label: { icon: <EthereumIcon /> },
walletsFilter: FilterChain("EVM"),
recommendedWallets: [
{
walletKey: "phantomevm",
},
],
},
{
label: { icon: <SolanaIcon /> },
walletsFilter: FilterChain("SOL"),
},
{
label: { icon: <BitcoinIcon /> },
walletsFilter: FilterChain("BTC"),
},
{
label: { icon: <FlowIcon /> },
walletsFilter: FilterChain("FLOW"),
},
],
},
},
],
},
}}
></DynamicContextProvider>
);
};
This is the wallet list view with the tabs
All chains tab selected | Ethereum selected |
---|---|
![]() | ![]() |
Let’s create a button that, when clicked, will automatically open the Ethereum tab.
Copy
Ask AI
import React from "react";
import { useDynamicContext } from "@dynamic-labs/sdk-react-core";
/**
* Component for a button that opens the Ethereum tab by default.
*/
const ConnectWithEthereum: React.FC = () => {
const { setShowAuthFlow, setSelectedTabIndex } = useDynamicContext();
/**
* Handles the button click event by setting the default tab to Ethereum and showing the authentication flow.
*/
const onClickHandler = (): void => {
setSelectedTabIndex(1); // Set the selected tab index to 1, which corresponds to the Ethereum tab
setShowAuthFlow(true);
};
return <button onClick={onClickHandler}>Connect with Ethereum wallet</button>;
};
export default ConnectWithEthereum;
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.