Type Presence

type Presence struct {
	// Motion is the duration and curve of entering and of leaving. A zero
	// duration disables the transition.
	Motion Motion
	// Fade multiplies the opacity of everything in the overlay by its progress.
	Fade bool
	// Scale is the size of the overlay at the start of entering and the end of
	// leaving, as a fraction of its own: 0.95 is Tailwind's zoom-95. Zero and one
	// leave the size alone.
	Scale float32
	// SlideIn is where the overlay sits relative to its place when it starts to
	// enter, and SlideOut where it ends up when it has left, in logical pixels.
	// A menu slides in a few pixels from its trigger and just fades out; a sheet
	// slides both ways. An overlay that is turned around halfway jumps by the
	// difference of the two at that moment, which is why they are small.
	SlideIn, SlideOut Point
}

Presence describes how one overlay enters and leaves: a dialog fading in and out while it grows from 95% of its size, a menu sliding a few pixels from the edge it opens on, a sheet sliding in from the side. It is the shape of the animation, not the state of it; the canvas keeps the state (see Canvas.BeginPresence).