Themes
- Default
- Catppuccin
- Dracula
- High Contrast
- High Contrast Light
- Monokai
- Nord
- One Dark
- Solarized
- Tokyo Night
- AMOLED
- Aura
- Ayu
- Carbonfox
- Catppuccin Frappe
- Catppuccin Macchiato
- Cobalt2
- Cursor
- Everforest
- Flexoki
- GitHub
- Gruvbox
- Kanagawa
- Lucent Orng
- Material
- Matrix
- Mercury
- Night Owl
- OC-2
- One Dark Pro
- OpenCode
- Orng
- Osaka Jade
- Palenight
- Rose Pine
- Shades of Purple
- Synthwave '84
- Vercel
- Vesper
- Zenburn
Utility
AI
Terminal
login-flow-demo
No opentui live preview is registered for this example yet.
Installation
$ pnpm dlx shadcn@latest add @termcn/login-flow
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 | - |
titleFont | "block" | "simple" | "shade" | "slim" | "block" |
titleColor | string | - |
padding | number | 2 |
onSelect | (index: number) => void | - |
children | ReactNode | required |
LoginFlow.Announcement
| Prop | Type | Default |
|---|---|---|
icon | string | "*" |
iconColor | string | - |
borderStyle | "single" | "round" | "double" | "bold" | "single" |
borderColor | string | - |
children | ReactNode | required |
LoginFlow.Description
| Prop | Type | Default |
|---|---|---|
bold | boolean | false |
dim | boolean | false |
color | string | - |
children | ReactNode | required |
LoginFlow.Select
| Prop | Type | Default |
|---|---|---|
label | string | - |
labelBold | boolean | false |
options | string[] | required |
activeIndex | number | - |
defaultIndex | number | 0 |
cursor | string | "›" |
cursorColor | string | "cyan" |
activeColor | string | "cyan" |
onSelect | (index: number) => void | required |
keyboardNav | boolean | true |