Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/setup-flow.json
Usage
import { SetupFlow } from "@/components/ui/setup-flow";<SetupFlow title="create-app">
<SetupFlow.Badge label="v1.0.0" />
<SetupFlow.Step status="done">Project name set to my-app</SetupFlow.Step>
<SetupFlow.Step status="done">Template selected: React</SetupFlow.Step>
<SetupFlow.Step status="active">Installing dependencies...</SetupFlow.Step>
<SetupFlow.MultiSelect
label="Select features"
hint="space to toggle, enter to confirm"
options={[
{ value: "ts", label: "TypeScript" },
{ value: "eslint", label: "ESLint", description: "Code linting" },
{ value: "prettier", label: "Prettier", description: "Formatting" },
]}
onSubmit={(values) => console.log(values)}
/>
</SetupFlow>API Reference
SetupFlow
| Prop | Type | Default |
|---|---|---|
title | string | undefined |
titleFont | "block" | "simple" | "shade" | "slim" | "block" |
titleColor | string | "#888888" |
titleColorAlt | string | undefined |
connectorChar | string | "│" |
connectorColor | string | undefined |
children | ReactNode | required |
SetupFlow.Badge
| Prop | Type | Default |
|---|---|---|
label | string | required |
bg | string | "cyan" |
color | string | "black" |
SetupFlow.Step
| Prop | Type | Default |
|---|---|---|
icon | string | undefined |
iconColor | string | undefined |
status | "done" | "active" | "pending" | "success" | "error" | "done" |
children | ReactNode | required |
SetupFlow.Spinner
| Prop | Type | Default |
|---|---|---|
label | string | required |
onComplete | () => void | undefined |
SetupFlow.MultiSelect
| Prop | Type | Default |
|---|---|---|
label | string | required |
hint | string | undefined |
options | { value: string; label: string; description?: string }[] | required |
values | string[] | undefined |
onChange | (values: string[]) => void | undefined |
onSubmit | (values: string[]) => void | undefined |
checkedChar | string | "■" |
uncheckedChar | string | "□" |
checkedColor | string | "green" |