The wtui-components
package is a Go library that offers a set of components for developing Text-based User Interfaces (TUI) with wtui or in standalone mode.
It includes features like input fields, selections, and other essential components for building interactive text-based applications.
Easy to set up, use, customize and modify. Some components are inspired by charmbracelet/bubbles.
go get https://github.com/anotherhadi/wtui-components@latest
Almost all components accept the wtopts.Opts struct (from wtui-components/wtops
) which allows you to modify various parameters: Colors, Default values, Maximum and Minimum, Max rows & columns, etc.
You can refer to the examples folder for each component to learn more about the component and/or opts.
The ansi
package provides a simple and user-friendly way to add color and formatting to terminal output in Go applications.
Enhance your command-line interfaces with vibrant text, background colors, and text styles, making your output more readable and visually appealing.
You can found an example here
The asciimoji
package is a collection of emojis made from ASCII characters. From asciimoji.com
You can found an example here
The asciitext
component is used to print large ASCII art text.
You can found an example with and without options here
The breadcrumb
component allows you to display breadcrumbs through a list of strings.
You can found an example here
The checkbox
component allows you to quicky prompt the user to choose multiple options.
Move with the arrow keys or JK, select an option with SPACE.
You can found an example with and without options here
The combobox
component allows you to quickly prompt the user to choose an option. Move with the arrow keys or JK, select an option with CR, and change the filter with other keys.
You can found an example with and without options here
The confirm
component allows you to quickly prompt the user to choose between Yes/No, True/False, etc..
Move with the arrow keys or HJKL/YN, confirm selection with CR
You can found an example with and without options here
The floatingwindow
component allow you to print boxes with different styles.
You can found an example with and without options here
The getchar
package enables you to capture a single character or key input without the need for the user to press enter.
You can found an example here
The getsize
package allows you to obtain the size in columns and rows of the terminal.
You can found an example here
The image
component allows you to print some low quality image in the terminal
You can found an example here
The input
component allows you to prompt the user to type a string.
You can found an example with and without options here
The list
component allows you to quickly prompt the user to choose an option (With Title/Description). Move with the arrow keys or HL, select an option with CR.
You can found an example with and without options here
The notification
component allows you to print some nice notifications.
You can change the notification's status through the "status" parameter.
You can found an example with and without options here
The numberpicker
component allows you to quickly prompt the user to choose a number.
Increment/Decrement with the arrow keys or HJ/KL, type a number to change the input, and validate with CR.
You can change 'Maximum, Minimum, Increment, Decimals' through Opts.
You can found an example with and without options here
The paragraph
component is used to print strings with the same look and feel as other components.
You can use the markdown syntax for bold and italic.
You can found an example with and without options here
The rgbapicker
component allows you to quickly prompt the user to choose a rgba color (Red,Green,Blue,Opacity).
Increment/Decrement/Move with the arrow keys or HJKL, type a number to change a field, and validate with CR.
You can found an example with and without options here
The rgbpicker
component allows you to quickly prompt the user to choose a rgb color (Red,Green,Blue).
Increment/Decrement/Move with the arrow keys or HJ/KL, type a number to change a field, and validate with CR.
You can found an example with and without options here
The selection
component allows you to quickly prompt the user to choose an option.
Move with the arrow keys or JK, select an option with CR.
You can found an example with and without options here
The shortcuts
component allows you to print a list of shortcuts with the same look and feel as other components.
You can found an example here
The spacer
component allows you to print space between components
You can found an example here
The table
component is ideal for creating tables with columns and other features for organized data representation.
You can found an example with and without options here
You can refer to the examples folder for each component to learn more about options (wtui-components/wtops
).
This project is licensed under the MIT License.