Skip to main content

@kea-wallet/react-ui

Pre-built React UI components for KEA Wallet — drop-in connect button, account switcher, and branding components.

Installation

npm install @kea-wallet/react-ui @kea-wallet/react-sdk
Peer dependencyVersion
react^18.0.0 || ^19.0.0
@kea-wallet/react-sdk^0.1.0

Quick Start

import { KeaProvider } from '@kea-wallet/react-sdk';
import { KeaConnectButton } from '@kea-wallet/react-ui';

const config = { rpcUrl: 'https://grpc-web.alphanet.thruput.org' };

function App() {
return (
<KeaProvider config={config}>
<KeaConnectButton />
</KeaProvider>
);
}

Key Concepts

  • Context required — every component must be rendered inside a KeaProvider from @kea-wallet/react-sdk.
  • Zero-config styling — components ship with dark-themed inline styles. No CSS imports or theme providers are needed.
  • Opinionated vs custom — these components cover common wallet flows out of the box. For fully custom UI, use the useWallet and useAccounts hooks from @kea-wallet/react-sdk directly.

Choosing a Component

ScenarioComponent
Simple connect / disconnectKeaConnectButton
Multi-account switchingKeaAccountSwitcher
Brand mark / logoKeaLogo

See

  • KeaProvider — entry-point context provider
  • useWallet — primary hook for wallet operations
  • useAccounts — hook for account state and switching

Components

FunctionDescription
KeaAccountSwitcherAccount switcher dropdown for KEA Wallet.
KeaConnectButtonPre-built connect / disconnect button for KEA Wallet.

Branding

FunctionDescription
KeaLogoRenders the KEA Wallet logo as an inline SVG.

Types

InterfaceDescription
KeaLogoPropsProps for the KeaLogo component.