195 Pro components and page blocks

Get Pro

Updated

Effort Dial

New

Preview

Customize

Colors
Width360px

Installation

npx shadcn@latest add https://uibrik.com/r/effort-dial.json
Adds the files to components/uibrik/effort-dial and installs @tabler/icons-react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/effort-dial.

Usage

import { EffortDial } from "@/components/uibrik/effort-dial/effort-dial";​const labels = ["Very easy", "Easy", "Okay", "Hard", "Very hard"];​const colors = ["#16a35a", "#84cc16", "#eab308", "#f97316", "#e5484d"];​<EffortDial  prompt="How easy was it to get set up?"  labels={labels}  colors={colors}  hardPrompt="What got in the way?"  width={360}  defaultValue={null}  submitLabel="Send"  thanksLabel="Thanks, that helps"  onSubmit={(feedback) => {}}  // value={0}  // onChange={(score) => {}}/>

Where to use Effort Dial

  • Setup and onboarding

    Asking how easy it was right after setup catches friction while it's fresh.

  • Support resolutions

    A customer effort score after a ticket closes tracks how hard help was to get.

  • Checkout and forms

    A hard answer opens a note, so the score comes with the reason behind it.

    Pairs with NPS Strip

Props

EffortDial
prompt
Type string
"How easy was it to get set up?"
The question above the dial.
labels
Type string[]
["Very easy","Easy","Okay","Hard","Very hard"]
One answer per segment, easiest first. Three to seven.
colors
Type string[]
["#16a35a","#84cc16","#eab308","#f97316","#e5484d"]
Gradient stops from easiest to hardest.
hardPrompt
Type string
"What got in the way?"
Asked when the answer is one of the two hardest. Empty skips it.
width
Type number
360
Width of the card; never wider than its container.
value / onChange
Type number | null / (score) => void
–
Controlled answer, 1 for the easiest, null for none.
defaultValue
Type number | null
null
Answer on mount when uncontrolled.
onSubmit
Type (feedback: { score, label, comment }) => void | Promise
–
Called when sent. Return a promise to hold the button in a sending state; a rejection keeps the card open.
submitLabel / thanksLabel
Type string
–
Send button text and the line shown once sent.
className
Type string
–
Classes for the wrapper.