Skip to content
forked from fzdwx/infinite

☄ A component library for developing interactive CLI(tui,terminal) programs.

License

Notifications You must be signed in to change notification settings

wangzhiy/infinite

 
 

Repository files navigation

infinite

gif

Help you to create interactive command line applications in Go.

Features

  • multi/single select
  • progress-bar group
  • spinner
  • confirm(input/selection)
  • input

Install

go get github.com/fzdwx/infinite@main

Examples

func main() {
	input := components.NewInput()
	input.Prompt = "Filtering: "
	input.PromptStyle = style.New().Bold().Italic().Fg(color.LightBlue)

	keymap := components.DefaultMultiKeyMap()
	keymap.Choice = key.NewBinding(
		key.WithKeys(tea.KeySpace.String()),
	)
	_, _ = inf.NewMultiSelect([]string{
		"a", "b", "c",
		"d", "e",
		"f",
		"g",
		"h",
	},
		multiselect.WithKeyMap(keymap),
		multiselect.WithHintSymbol("x"),
		multiselect.WithUnHintSymbol("√"),
		multiselect.WithPageSize(3),
		multiselect.WithFilterInput(input),
	).
		Display("select your items!")
}

More: https://github.com/fzdwx/infinite/tree/main/_examples

License

MIT

About

☄ A component library for developing interactive CLI(tui,terminal) programs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.9%
  • Just 0.1%