Billing Inactive Account Policy
An informational block for account settings pages that explains what happens if an account goes dormant: the inactivity threshold, an alert with days until deactivation, and a step-by-step timeline of warning emails and data handling. Includes a 'Keep my account' action for anyone who wants to reset the clock.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its alert, badge, button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/billing-inactive-account-policy.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing65.tsx instead.
Usage
The file also exports billing65Demo, 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 { Billing65, billing65Demo } from "@/components/blocks/billing/billing65"; export default function Page() { return <Billing65 {...billing65Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Inactive account policy" | Block heading. |
| description | string | none | Optional supporting text under the heading. |
| inactivityThresholdDays | number | 180 | Number of days of no activity before an account is considered inactive, shown in the explainer line. |
| lastActiveLabel | string | none | Text shown as the alert title, e.g. "Last active 152 days ago". Omit to hide the alert entirely along with daysUntilDeactivation. |
| daysUntilDeactivation | number | none | Days left before deactivation; the alert switches to the destructive style at 7 or fewer. |
| milestones | PolicyMilestone[] | none | Timeline entries rendered in order, each with a passed flag you control. |
| keepAccountLabel | string | "Keep my account" | Label on the bottom action button. |
| keepAccountHref | string | "#" | Destination for the action button. |
| className | string | none | Extra classes for the outer container. |
Types
interface PolicyMilestone { id: string; label: string; description: string; passed?: boolean; }
Behavior notes
- The alert only renders when lastActiveLabel or daysUntilDeactivation is provided, and switches to the destructive variant once daysUntilDeactivation is 7 or fewer.
- Each milestone's passed flag is a plain boolean you set from your own data; the component doesn't compute it from any date, it just changes the badge between "Upcoming" and "Sent" and dims the timeline dot.
- Milestones render in the order given, in a simple bordered timeline with no built-in sorting.
- The 'Keep my account' button is a plain anchor rendered through the Button component's render prop, so keepAccountHref should point at whatever route resets the inactivity timer on your backend.
- This is a static display component; nothing recalculates client-side, all timing and status values come from props.
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.