@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 dependency | Version |
|---|---|
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-sdkdirectly.
Choosing a Component
| Scenario | Component |
|---|---|
| Simple connect / disconnect | KeaConnectButton |
| Multi-account switching | KeaAccountSwitcher |
| Brand mark / logo | KeaLogo |
See
- KeaProvider — entry-point context provider
- useWallet — primary hook for wallet operations
- useAccounts — hook for account state and switching
Components
| Function | Description |
|---|---|
| KeaAccountSwitcher | Account switcher dropdown for KEA Wallet. |
| KeaConnectButton | Pre-built connect / disconnect button for KEA Wallet. |
Branding
| Function | Description |
|---|---|
| KeaLogo | Renders the KEA Wallet logo as an inline SVG. |
Types
| Interface | Description |
|---|---|
| KeaLogoProps | Props for the KeaLogo component. |