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
File picker requires Node.js filesystem access and may not render in the browser preview.
Installation
$ pnpm dlx shadcn@latest add @termcn/file-picker
Usage
import { FilePicker } from "@/components/ui/file-picker";<FilePicker
label="Select a config file"
extensions={[".json", ".yaml", ".yml"]}
onSubmit={(path) => console.log("Selected:", path)}
/>API Reference
FilePicker
| Prop | Type | Default |
|---|---|---|
value | string | - |
onChange | (path: string) => void | - |
onSubmit | (path: string) => void | - |
label | string | - |
startDir | string | process.cwd() |
extensions | string[] | - |
dirsOnly | boolean | false |
autoFocus | boolean | false |
id | string | - |
width | number | 50 |
maxVisible | number | 8 |