Request Lifecycle Preview
Request Lifecycle Preview
A persistent request card with Asked, Planned, Shipped and Answered scenes.
Dependencies
React
Installation
Add this component with your preferred package manager.
pnpm dlx shadcn@4.21.5 add @cavemio/request-lifecycle-previewFirst install? Configure @cavemio once
Run npx shadcn@4.21.5 init if shadcn is not set up, then merge this entry into the registries field in your existing components.json. Keep your other settings and registries.
components.json
{
"registries": {
"@cavemio": "https://registry.cavemio.dev/r/cavemio-{name}.json"
}
}Usage
Four lifecycle scenes with local demo content. Supply your own data and connect the selected stage to your application.
import { RequestLifecyclePreview } from "@/components/request-lifecycle-preview";
<RequestLifecyclePreview stage={stage} data={requestData} />Props
| Prop | Type | Description |
|---|---|---|
| stage | RequestLifecycleStage | Required. Current stage of the request lifecycle. |
| data | RequestLifecycleData | Required. Request title and description, votes, voters, activity, roadmap, release, and email content. |
| labels | { pending?: string; planned?: string; completed?: string; votes?: string; emailed?: string; voters?: string; justNow?: string; } | Optional. Translations for lifecycle status and supporting labels. |
| className | string | Optional. Additional CSS classes for the root element. |
| style | CSSProperties | Optional. Inline styles for the root element. |
| ariaLabel | string | Optional. Accessible name for the component. |
Accessibility & motion
Inactive scenes are inert and hidden from assistive technology. Reduced motion disables movement, fades and vote counting. Layout measures wrapping content to avoid clipping.
pnpm dlx shadcn@4.21.5 add @cavemio/request-lifecycle-preview