Require Account

A component that renders content only when an account is selected.

Introduction

RequireAccount conditionally renders children only when a wallet account is selected for the given chain.

Installation

npx polkadot-ui@latest add require-account

Usage

Require Account
Render children only when an account is selected
Please select an account to continue.
Require Account - Basic Example
Render children only when an account is selected
Please select an account to continue
Require Account - With Loading State
Show a loading fallback while resolving accounts
Resolving accounts...

Props

PropTypeRequiredDescription
childrenReactNodeContent to render when an account is selected
fallbackReactNodeContent to render when no account is selected
loadingFallbackReactNodeOptional content to show while loading