Net Promoter Score widget — SVG half-circle arc gauge + breakdown bars.
Shows an NPS score (0-100) as a semi-circular gauge, with the breakdown of
promoters, passives, and detractors displayed below. Zero JavaScript —
arc math is computed server-side using stroke-dasharray.
Examples
<.nps_widget
score={62}
promoters={450}
passives={120}
detractors={80}
total_responses={650}
/>
Summary
Functions
Attributes
score(:integer) (required) - NPS score (0-100).promoters(:integer) (required) - Number of promoters (score 9-10).passives(:integer) (required) - Number of passives (score 7-8).detractors(:integer) (required) - Number of detractors (score 0-6).total_responses(:integer) (required) - Total survey responses (used for percentage bars).class(:string) - Additional CSS classes for the root element. Defaults tonil.- Global attributes are accepted. HTML attributes forwarded to the root
<div>.