Overview
Bunli TUI provides a comprehensive set of components for building beautiful terminal user interfaces. All components are built on OpenTUI and integrate seamlessly with React.Layout Components
Stack
Flexbox-based layout container.Example
Grid
Grid layout for organizing content.Example
Container
Max-width container with padding.Display Components
Card
Container for grouping related content.Example
Alert
Display important messages.Example
Badge
Small status indicator.Example
Divider
Visual separator.Example
EmptyState
Placeholder for empty content.Example
KeyValueList
Display key-value pairs.Example
ProgressBar
Visual progress indicator.Example
Form Components
Form
Schema-based form with validation.Example
FormField
Generic text input field.SelectField
Dropdown select field.MultiSelectField
Multiple selection field.CheckboxField
Boolean checkbox field.PasswordField
Password input with toggle.TextareaField
Multiline text input.Interactive Components
Modal
Overlay modal dialog.Example
Menu
Keyboard-navigable menu.Example
CommandPalette
Searchable command palette.DataTable
Tabular data display.Example
Tabs
Tabbed content switcher.Best Practices
Layout
Use
Stack and Grid for responsive layouts that adapt to terminal sizeForms
Always use schema validation with Zod or similar for type-safe forms
Accessibility
- Provide keyboard shortcuts for all interactive elements
- Use semantic component names
- Include helpful hints and descriptions
Theming
Use theme tokens instead of hardcoded colors for consistent styling
Performance
- Avoid deep nesting of layout components
- Use
React.memofor expensive components - Minimize re-renders in tables and lists