DAO Governance Proposals
A list of DAO governance proposals: status badges for active, passed, and rejected proposals, a for/against vote split bar, a quorum progress bar, a live countdown for active proposals, and the proposer's truncated address.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/dao-governance-proposals.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/finance/finance24.tsx instead.
Usage
The file also exports finance24Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Finance24, finance24Demo } from "@/components/blocks/finance/finance24"; export default function Page() { return <Finance24 {...finance24Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Governance proposals" | Section heading. |
| description | string | "Vote on active proposals and track how the DAO has decided in the past." | Supporting line under the heading. |
| proposals | GovernanceProposal[] | none | The list of proposals to render. |
| className | string | none | Extra classes for the outer section element. |
Types
export type ProposalStatus = "active" | "passed" | "rejected"; export interface GovernanceProposal { id: string; title: string; description: string; status: ProposalStatus; forVotes: number; againstVotes: number; quorum: number; proposer: string; /** ISO date string; only read when status is "active". */ votingEndsAt?: string; }
Behavior notes
- The for/against split and quorum progress bars are computed at render time from forVotes/againstVotes/quorum, no live vote submission happens anywhere.
- The countdown on active proposals is real client-side state: a useEffect ticks every second off votingEndsAt, starting from a null placeholder so the server-rendered and first client render stay in sync before the timer takes over.
- There is no wallet connection or on-chain voting, this is a read-only display block.
More Finance Blocks
View all →token-price-hero
Token Price Hero
Hero section with a live token price card, market cap, volume, and supply grid.
airdrop-claim-card
Airdrop Claim Card
Token airdrop claim card with an eligibility checklist, expiration timer, and claim flow.
contract-address-list
Contract Address List
Smart contract addresses with copy-to-clipboard and explorer link buttons.