What's this UI? - Components
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.
Contents
Installation
go get https://github.com/anotherhadi/wtui-components@latest
Components
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.
ANSI

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
Asciimoji

The asciimoji
package is a collection of emojis made from ASCII characters. From asciimoji.com
You can found an example here
Asciitext

The asciitext
component is used to print large ASCII art text.
You can found an example with and without options here
Breadcrumb

The breadcrumb
component allows you to display breadcrumbs through a list of strings.
You can found an example here
Checkbox

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
Combobox

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
Confirm

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
Floating Window

The floatingwindow
component allow you to print boxes with different styles.
You can found an example with and without options here
Get Char

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
Get Size

The getsize
package allows you to obtain the size in columns and rows of the terminal.
You can found an example here
Image

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
List

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
Notification

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
Number Picker

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
Paragraph

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
RGBA Picker

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
RGB Picker

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
Selection

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
Shortcuts

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
Spacer

The spacer
component allows you to print space between components
You can found an example here
Table

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
Options
You can refer to the examples folder for each component to learn more about options (wtui-components/wtops
).
License
This project is licensed under the MIT License.