React Components
Build Cardano dApps with pre-built React components and hooks for wallet connections, transactions, and blockchain interactions.
Overview
Mesh React provides a complete toolkit for building Cardano decentralized applications with React. You get pre-built UI components for wallet connections, React hooks for accessing wallet state, and utilities for blockchain interactions.
Use Mesh React when you need to:
- Connect users to their Cardano wallets (Nami, Eternl, Flint, etc.)
- Display wallet balances and assets
- Build transaction signing flows
- Create multi-wallet support in your dApp
Quick Start
Install the package and wrap your app with the provider:
import "@meshsdk/react/styles.css";
import { MeshProvider, CardanoWallet } from "@meshsdk/react";
function App() {
return (
<MeshProvider>
<CardanoWallet />
</MeshProvider>
);
}What's Included
Getting Started
Installation, setup, and your first wallet connection
UI Components
Pre-built wallet buttons, badges, and connection modals
Wallet Hooks
React hooks for wallet state, assets, addresses, and networks
Browser Wallet API
Full CIP-30 wallet API for transactions and signing
Installation
Install using your preferred package manager:
npm install @meshsdk/reactyarn add @meshsdk/reactpnpm add @meshsdk/reactOr scaffold a complete project with the Mesh CLI:
npx meshjs your-app-nameRequirements
- React 18 or later
- Next.js 13+ (App Router or Pages Router)
- A Cardano wallet browser extension (Nami, Eternl, Flint, Lace, etc.)
Related Resources
- Browser Wallet API - Full CIP-30 wallet interface
- Transaction Builder - Build and sign transactions
- Providers - Blockchain data providers (Blockfrost, Koios, etc.)
- Mesh CLI - Project scaffolding and utilities