推荐项目

progressprogress groupmulit selectinput textconfirmmulti select
package main

import (
	inf "github.com/fzdwx/infinite"
	"github.com/fzdwx/infinite/color"
	"github.com/fzdwx/infinite/components"
	"github.com/fzdwx/infinite/components/selection/multiselect"
	"github.com/fzdwx/infinite/style"
)

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

	_, _ = inf.NewMultiSelect([]string{
		"Buy carrots",
		"Buy celery",
		"Buy kohlrabi",
		"Buy computer",
		"Buy something",
		"Buy car",
		"Buy subway",
	},
		multiselect.WithHintSymbol("x"),
		multiselect.WithUnHintSymbol("√"),
		multiselect.WithFilterInput(input),
	).Display("select your items!")
}
  • 截图:

multi select
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-VMsv6Lyz-1660016785950)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c40aa414f3684673838b816bf46e2284~tplv-k3u1fbpfcp-zoom-1.image)]

progress bar
image

confirm
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-O4iGoE5S-1660016785952)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8c81ebea184e4e04aea39cee9e9a0aef~tplv-k3u1fbpfcp-zoom-1.image)]

  • 后续更新计划:
  1. 目前项目还属于刚起步,需要做的事情很多。
  2. 提供更多的组件。
  3. 提供更多的使用案例。
  4. 提供组合使用的案例。
  5. 增强定制化的能力…