Utility
Terminal
█
path-input-demo █
Loading preview... █
█
█
█
█
█
█
█
█
█
█
█
█
█
█
█Path input requires Node.js filesystem access and may not render in the browser preview.
Installation
$ pnpm dlx shadcn@latest add @termcn/opentui/path-input
Usage
import { PathInput } from "@/components/ui/path-input";<PathInput
label="Project Directory"
placeholder="/home/user/projects"
onSubmit={(path) => console.log("Selected:", path)}
/>API Reference
PathInput
| Prop | Type | Default |
|---|---|---|
value | string | - |
onChange | (value: string) => void | - |
onSubmit | (value: string) => void | - |
label | string | - |
placeholder | string | "/" |
autoFocus | boolean | false |
id | string | - |
width | number | 40 |
filter | string | - |
dirsOnly | boolean | false |