New in v0.4.8
Explore the new customization options for poll widgets
Display Modes
Control how the poll widget displays voting and results interfaces
Vote Mode
Shows only voting interface, auto-switches to results after voting
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
displayMode="vote"
/>Result Mode
Always shows results interface (no voting)
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
displayMode="result"
/>Mixed Mode (Default)
Auto-switches based on vote status
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
displayMode="mixed"
/>Results Visibility Control
Hide results data while showing vote status
Results Hidden
Shows "You've voted" message without revealing data
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
displayMode="mixed"
showResults={false}
/>Custom Hidden Message
Customize the message shown when results are hidden
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
displayMode="result"
showResults={false}
resultsHiddenMessage="..."
/>Vote Success Effects
Celebrate successful votes with banners and confetti
Success Banner
Shows a slide-in banner with custom message
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
displayMode="vote"
successMessage="Your vote!"
/>Confetti Celebration
Trigger confetti animation on successful vote
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
displayMode="vote"
enableConfetti={true}
/>No Success Banner
Disable the success banner completely
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
displayMode="vote"
showSuccessBanner={false}
/>Custom Banner Duration
Control how long the success banner stays visible
What is your favorite web3 framework?
Active<PollWidget
pollId={1n}
successDuration={5000}
/>Complete Example
All features combined
What is your favorite web3 framework?
ActiveFull Configuration:
<PollWidget
pollId={1n}
displayMode="vote"
showResults={true}
successMessage="Thank you for participating!"
successDuration={4000}
enableConfetti={true}
onVoteSuccess={() => console.log('Success!')}
onVoteError={(error) => console.error(error)}
/>Display Mode Behavior Reference
| displayMode | showResults | Before Vote | After Vote |
|---|---|---|---|
| vote | true | Voting UI | "You voted" + Results Data |
| vote | false | Voting UI | "You voted" (no data) |
| result | true | Results Data | Results Data |
| result | false | "Results hidden" | "You voted" (no data) |
| mixed | true | Voting UI | Results Data |
| mixed | false | Voting UI | "You voted" (no data) |