Custom UI
This guide covers how to build custom governance UIs
Custom UI Integration
Integrate Realms components into your application, and work with the Realms UI codebase.
Important: Repository Access
SPL Governance (the on-chain program and Rust/TS SDKs) is open source and freely available in this repository.
Realms UI (the frontend application at realms.today) is a private repository. To access the UI codebase for integration, embedding, or forking purposes, contact the Realms team for repository access.
Contact for Realms UI access:
Discord: Realms
Building Your Own Governance UI
Using the SDK Directly
You can build a complete governance UI using only the @realms-today/spl-governance SDK and @solana/web3.js:
npm install @realms-today/spl-governance @solana/web3.jsDisplay Realm Info
import { getRealm, getAllGovernances } from '@realms-today/spl-governance';
async function RealmDashboard({ realmAddress }) {
const realm = await getRealm(connection, realmAddress);
return {
name: realm.account.name,
communityMint: realm.account.communityMint.toBase58(),
authority: realm.account.authority?.toBase58(),
};
}List Active Proposals
Voting Component
Plugin UI Integration
If your DAO uses a governance plugin (VSR, NFT Voter, etc.), your UI needs to implement the VotePlugin interface to handle deposits, withdrawals, and voter weight updates.
The plugin interface:
Each governance action (create proposal, cast vote, etc.) needs to include the voter weight update instructions in the same transaction:
Realms UI Architecture (Private Repo)
Requires repository access - contact the Realms team.
The Realms UI is a Next.js application with the following structure:
Key Technologies
Next.js 15 with Pages Router
React 19
TanStack React Query for data fetching
Zustand for state management
Tailwind CSS for styling
@realms-today/spl-governance SDK
@coral-xyz/anchor for Anchor program interactions
Adding a New Plugin to the UI
If you've built a custom on-chain plugin and have UI repo access:
Create a new directory under
src/plugins/plugins/your-plugin/Add your Anchor IDL as
idl.jsonand types asidl.tsImplement the
VotePlugininterface inclient.tsRegister your plugin's program ID in
src/plugins/constants/index.tsAdd your plugin instance to the plugins array in
src/plugins/index.ts
Embedding Governance Widgets
For lightweight integration, you can build standalone governance widgets that embed in any web page:
Proposal Status Widget
Treasury Balance Widget
Contact for UI Repo Access
The Realms UI repository is private. For access to the codebase for building custom integrations, embedding components, or deploying your own instance:
Discord: Realms
Contact the Realms team directly to discuss your integration needs and get repository access.
Last updated