Billing Subscription Renewal Survey
A feedback form for the renewal or cancellation window that asks a satisfaction rating first, then reveals a set of toggleable focus-area chips and an optional textarea once a rating is picked. Submitting shows a loading state followed by a thank-you screen that echoes the rating back. Built for account settings or a cancellation flow where you want a quick read on why someone is or isn't renewing.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, label, textarea dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/billing-subscription-renewal-survey.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing133.tsx instead.
Usage
The file also exports billing133Demo, 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 { Billing133, billing133Demo } from "@/components/blocks/billing/billing133"; export default function Page() { return <Billing133 {...billing133Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Before your plan renews" | Form heading. |
| description | string | (see source) | Supporting line under the heading. |
| ratingQuestion | string | "How satisfied are you with your current plan?" | Label above the 1-5 rating buttons. |
| focusAreasQuestion | string | "What matters most to your decision to renew?" | Label above the focus-area chips. |
| focusAreas | SurveyFocusArea[] | none | Chips the respondent can toggle on or off after picking a rating. |
| feedbackLabel | string | (see source) | Label above the optional feedback textarea. |
| feedbackPlaceholder | string | (see source) | Placeholder text inside the feedback textarea. |
| submitLabel | string | "Submit feedback" | Label on the submit button. |
| className | string | none | Extra classes for the outer form container. |
Types
interface SurveyFocusArea { id: string; label: string; }
Behavior notes
- The rating buttons are a radiogroup of 1-5 values; only one can be selected at a time.
- The focus-area chips and feedback textarea are hidden until a rating is picked, matching a progressive-disclosure pattern so the form doesn't feel long up front.
- Focus-area chips use aria-pressed and toggle independently, so any number of them can be selected at once, unlike the single-choice rating buttons.
- The submit button stays disabled until a rating is chosen, even though the focus areas and textarea are both optional.
- Submitting sets a loading state for about 800ms, then replaces the form with a thank-you message that repeats the chosen rating. Nothing is sent anywhere by default, wire your own onSubmit if you fork the component.
Frequently asked questions
More Billing Blocks
View all →Billing Invoice List
Invoice history table with status badges, formatted amounts, and a per-row download link, built with shadcn/ui and Tailwind CSS.
Billing Failed Payment Alert
High-contrast failed-payment alert with a message, a retry button, and an optional update-payment-method button, built with shadcn/ui and Tailwind CSS.
Billing Credit Balance
Compact credit balance card with a large total, an optional purchased-versus-promotional breakdown, a low-balance notice, and a top-up button.
Billing Payment Methods
A saved payment method list for React and Next.js with brand icons, a default badge, near-expiry warnings, and remove/set-default actions per row.
Billing Add Card
A card entry form for React and Next.js with auto-formatted fields, internal brand detection, and per-field validation feedback built with shadcn/ui and Tailwind CSS.
Billing Coupon Code
An inline promo code input for React and Next.js with a simulated loading state, an applied summary showing the discount amount, and an invalid-code message.