Utility
AI
Terminal
Path input requires Node.js filesystem access and may not render in the browser preview.
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/path-input.json
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 | undefined |
onChange | (value: string) => void | undefined |
onSubmit | (value: string) => void | undefined |
label | string | undefined |
placeholder | string | "/" |
autoFocus | boolean | false |
id | string | undefined |
width | number | 40 |
filter | string | undefined |
dirsOnly | boolean | false |