motion

package
v0.0.0-...-d88b4ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Fast = 100 * time.Millisecond
	Mid  = 200 * time.Millisecond
	Slow = 300 * time.Millisecond
)

Variables

View Source
var (
	SoftEase     = ui.CubicBezier(0.32, 0.72, 0, 1)
	ExitEase     = ui.CubicBezier(0.4, 0, 1, 1)
	EaseOut      = ui.CubicBezier(0.215, 0.61, 0.355, 1)
	EaseInOut    = ui.CubicBezier(0.645, 0.045, 0.355, 1)
	EaseOutBack  = ui.CubicBezier(0.12, 0.4, 0.29, 1.46)
	EaseOutQuint = ui.CubicBezier(0.23, 1, 0.32, 1)
	EaseOutCirc  = ui.CubicBezier(0.08, 0.82, 0.17, 1)
	CSSEase      = ui.CubicBezier(0.25, 0.1, 0.25, 1)
	CSSEaseIn    = ui.CubicBezier(0.42, 0, 1, 1)
	ToastEase    = ui.CubicBezier(0.22, 1, 0.36, 1)
)
View Source
var SwitchThumb = ui.Animation{Spring: ui.SpringOptions{Stiffness: 360, Damping: 24, Mass: 1}}

Functions

func Backdrop

func Backdrop() ui.ElementTransition

func Bouncy

func Bouncy(settle time.Duration) ui.Animation

func Collapse

func Collapse() ui.ElementTransition

func Drawer

func Drawer(from Side) ui.ElementTransition
func Modal() ui.ElementTransition
func Popup() ui.ElementTransition

func Smooth

func Smooth(settle time.Duration) ui.Animation

func Snappy

func Snappy(settle time.Duration) ui.Animation

func Spring

func Spring(zeta, threshold float64, settle time.Duration) ui.Animation

func Toast

func Toast(from Side) ui.ElementTransition

func Tooltip

func Tooltip() ui.ElementTransition

func Toward

func Toward(tr ui.ElementTransition, side Side) ui.ElementTransition

Toward turns the offset of a preset made for an element below its anchor, as Popup and Tooltip are, so that it starts at the anchor from side.

Types

type Side

type Side int
const (
	Bottom Side = iota
	Top
	Left
	Right
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL