Components
Bunli provides a rich library of pre-built components for building terminal UIs. Components are styled with OpenTUI and themeable viaThemeProvider.
Import Paths
Form Components
Form
Schema-driven form container with validation:title: string- Form titleschema: StandardSchemaV1- Validation schema (Zod, Valibot, etc.)onSubmit: (values) => void | Promise<void>- Submit handleronCancel?: () => void- Cancel handlerinitialValues?: Partial<T>- Initial form valuesvalidateOnChange?: boolean- Validate while typing (default:true)submitHint?: string- Custom submit hint
Tab/Shift+Tab- Navigate fieldsEnter- Submit formCtrl+S- Force submitCtrl+R- Reset formEsc- CancelF8/Shift+F8- Jump to next/previous error
SchemaForm
Higher-level form builder with field descriptors:text- Text inputnumber- Number inputpassword- Password inputtextarea- Multi-line textselect- Single selectionmultiselect- Multiple selectionscheckbox- Boolean checkbox
FormField (Input)
Controlled text input field:SelectField
Controlled select dropdown:Other Form Fields
Layout Components
Container
Stack
Grid
Panel
Card
Feedback Components
Alert
tone?: 'info' | 'success' | 'warning' | 'danger'(default:'info')title?: stringmessage: stringemphasis?: 'subtle' | 'bold'(default:'subtle')
Badge
ProgressBar
Toast
EmptyState
Data Display Components
KeyValueList
Stat
DataTable
↑/↓ork/j- Navigate rows←/→orh/l- Change sort columnEnter- Select row
List & Table (Simple)
Navigation Components
Tabs
←/→ or h/l to switch tabs
Menu
↑/↓ or k/j, Enter to select
CommandPalette
↑/↓ to navigate, Enter to select
Modal
Esc to close, Tab for focus trap
Chart Components
BarChart
LineChart
Sparkline
Theming
ThemeProvider
Theme Presets
Use Theme Hook
Next Steps
Interactive UIs
Build full interactive interfaces
Prompts
Learn about prompt APIs