Skip to content
项目

关于

Animation library for terminal UIs

设计与媒体

这些数字如何统计

实测星标增长

24小时
正在收集历史
7天
正在收集历史
15天
正在收集历史
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

tarang

Animation library for terminal UIs

Tarang terminal animation demo

Install

Use Go 1.24 or later. Run this in your Go module.

go get github.com/vyrx-dev/tarang

Quick start

Save this as main.go and run go run . in an ANSI-capable terminal.

package main

import (
	"fmt"
	"time"

	"github.com/vyrx-dev/tarang"
	"github.com/vyrx-dev/tarang/effects"
)

func main() {
	const step = time.Second / 30
	p := tarang.New("Hello, Tarang!", effects.Typewriter(), tarang.FromEnv())
	fmt.Print(p.View())
	for !p.Done() {
		time.Sleep(step)
		p.Advance(step)
		fmt.Printf("\r%s", p.View())
	}
	fmt.Println()
}

Showcase

See every effect in an interactive terminal gallery:

cd adapters/bubbletea && go run ./examples/showcase

Documentation

Credits and licenses

TerminalTextEffects inspired many of the visuals. Tarang implements them independently. The easing curves follow Robert Penner's equations.

Tarang is MIT-licensed. See LICENSE and the dependency license notices.

探索相关项目

加载中…