BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/cult/ui/choice-poll

choice-poll

cult-ui/choice-poll
UnverifiedComponent

Poll component with single or multiple selection, optional results, and keyboard navigation

Install it

npx shadcn@latest add https://raw.githubusercontent.com/nolly-studio/cult-ui/HEAD/apps/www/choice-poll.json

Source

registry/default/ui/choice-poll.tsxraw.githubusercontent.com/nolly-studio/cult-ui/HEAD/apps/www/choice-poll.json · first 6 KB
1"use client"
2
3import {
4 createContext,
5 useCallback,
6 useContext,
7 useEffect,
8 useMemo,
9 useRef,
10 useState,
11 type ComponentProps,
12 type KeyboardEvent,
13 type MouseEvent,
14} from "react"
15import { useControllableState } from "@radix-ui/react-use-controllable-state"
16import { cva } from "class-variance-authority"
17import { Check } from "lucide-react"
18
19import { cn } from "@/lib/utils"
20
21/* -----------------------------------------------------------------------------
22 * Types
23 * -------------------------------------------------------------------------- */
24
25export interface ChoicePollRootProps
26 extends Omit<ComponentProps<"div">, "defaultValue"> {
27 /** Currently selected option(s) - controlled */
28 value?: string | string[]
29 /** Default selected option(s) - uncontrolled */
30 defaultValue?: string | string[]
31 /** Callback when selection changes */
32 onValueChange?: (value: string | string[]) => void
33 /** Whether multiple selections are allowed */
34 multiple?: boolean
35 /** Whether the poll is disabled */
36 disabled?: boolean
37 /** Whether poll results should be visible after voting */
38 showResults?: boolean
39 /** Vote counts per option (for showing results) */
40 votes?: Record<string, number>
41 /** Whether user has submitted their vote */
42 hasVoted?: boolean
43}
44
45export interface ChoicePollOptionProps extends ComponentProps<"button"> {
46 /** Unique identifier for this option */
47 value: string
48 /** Whether this specific option is disabled */
49 disabled?: boolean
50}
51
52export type ChoicePollHeaderProps = ComponentProps<"div">
53
54export type ChoicePollTitleProps = ComponentProps<"h3">
55
56export type ChoicePollDescriptionProps = ComponentProps<"p">
57
58export type ChoicePollOptionsProps = ComponentProps<"div">
59
60export type ChoicePollLabelProps = ComponentProps<"span">
61
62export type ChoicePollIndicatorProps = ComponentProps<"span">
63
64export type ChoicePollProgressProps = ComponentProps<"div">
65
66export type ChoicePollPercentageProps = ComponentProps<"span">
67
68export interface ChoicePollFooterProps extends ComponentProps<"div"> {
69 /** Total number of votes */
70 totalVotes?: number
71}
72
73/* -----------------------------------------------------------------------------
74 * Context
75 * -------------------------------------------------------------------------- */
76
77interface ChoicePollContextValue {
78 selected: string[]
79 multiple: boolean
80 disabled: boolean
81 showResults: boolean
82 votes: Record<string, number>
83 totalVotes: number
84 hasVoted: boolean
85// … truncated

What it pulls in

npm packages

  • @radix-ui/react-use-controllable-state
  • lucide-react

Files it writes

  • registry/default/ui/choice-poll.tsx

Facts

Registry
cult/ui
Type
registry:ui
Access
Unverified
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

www.cult-ui.com nolly-studio/cult-ui on GitHub Raw registry item This item as JSON

More from cult/ui

All 157 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
ai-instructionsai-instructionscult/uiComponentsUnverified2 deps
ai-instructions-demoai-instructions-democult/uiComponentsUnverifiedno deps
animated-numberanimated-numbercult/uiComponentsUnverified1 dep
animated-number-demoanimated-number-democult/uiComponentsUnverifiedno deps
bg-animate-buttonbg-animate-buttoncult/uiComponentsUnverifiedno deps
bg-animate-button-demobg-animate-button-democult/uiComponentsUnverifiedno deps
bg-animated-fractal-dot-gridbg-animated-fractal-dot-gridcult/uiComponentsUnverified1 dep
bg-animated-fractal-dot-grid-demobg-animated-fractal-dot-grid-democult/uiComponentsUnverifiedno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex