Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/login-flow.json
Usage
import { LoginFlow } from "@/components/ui/login-flow";<LoginFlow title="Acme CLI" padding={2}>
<LoginFlow.Announcement icon="🎉">
Version 3.0 is now available!
</LoginFlow.Announcement>
<LoginFlow.Description>
Sign in to access your workspace.
</LoginFlow.Description>
<LoginFlow.Select
label="Choose a login method:"
options={["GitHub", "Google SSO", "Email & Password"]}
onSelect={(index) => console.log("selected", index)}
/>
</LoginFlow>API Reference
LoginFlow
| Prop | Type | Default |
|---|---|---|
title | string | undefined |
titleFont | "block" | "simple" | "shade" | "slim" | "block" |
titleColor | string | undefined |
padding | number | 2 |
onSelect | (index: number) => void | undefined |
children | ReactNode | required |
LoginFlow.Announcement
| Prop | Type | Default |
|---|---|---|
icon | string | "*" |
iconColor | string | undefined |
borderStyle | "single" | "round" | "double" | "bold" | "single" |
borderColor | string | undefined |
children | ReactNode | required |
LoginFlow.Description
| Prop | Type | Default |
|---|---|---|
bold | boolean | false |
dim | boolean | false |
color | string | undefined |
children | ReactNode | required |
LoginFlow.Select
| Prop | Type | Default |
|---|---|---|
label | string | undefined |
labelBold | boolean | false |
options | string[] | required |
activeIndex | number | undefined |
defaultIndex | number | 0 |
cursor | string | "›" |
cursorColor | string | "cyan" |
activeColor | string | "cyan" |
onSelect | (index: number) => void | required |
keyboardNav | boolean | true |