类型 Easing

API 文档由 Go 源码生成,内容为英文。

type Easing uint8

Easing selects a cubic-bezier timing curve for a transition. The zero value is the standard curve used by Tailwind's default `transition`.

常量

const (
	// EaseInOut is cubic-bezier(0.4, 0, 0.2, 1), the default state-change curve.
	EaseInOut Easing = iota
	// EaseOut is cubic-bezier(0, 0, 0.2, 1) for entering elements.
	EaseOut
	// EaseIn is cubic-bezier(0.4, 0, 1, 1) for leaving elements.
	EaseIn
	// EaseLinear is the identity curve.
	EaseLinear
	// EaseCSS is the CSS keyword `ease`, cubic-bezier(0.25, 0.1, 0.25, 1): the
	// curve Tailwind's animate-in and animate-out use for a popup entering or
	// leaving.
	EaseCSS
	// EaseEmphasized is cubic-bezier(0.22, 1, 0.36, 1), a long, soft landing: the
	// slide of a drawer or a toast.
	EaseEmphasized
)

方法

At#

func (easing Easing) At(progress float32) float32

At maps linear progress in [0, 1] onto the eased curve. Inputs outside the range clamp to the exact end points.