<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.spiretrading.com/index.php?action=history&amp;feed=atom&amp;title=Animations</id>
	<title>Animations - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.spiretrading.com/index.php?action=history&amp;feed=atom&amp;title=Animations"/>
	<link rel="alternate" type="text/html" href="https://wiki.spiretrading.com/index.php?title=Animations&amp;action=history"/>
	<updated>2026-07-28T20:23:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.spiretrading.com/index.php?title=Animations&amp;diff=173&amp;oldid=prev</id>
		<title>Jon: Created page with &quot;Animations in Spire follow a philosophy of enhancing clarity and communication without embellishment or impedance to the user.  In CSS there are transitions, in Spire an anima...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.spiretrading.com/index.php?title=Animations&amp;diff=173&amp;oldid=prev"/>
		<updated>2026-07-07T18:13:32Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Animations in Spire follow a philosophy of enhancing clarity and communication without embellishment or impedance to the user.  In CSS there are transitions, in Spire an anima...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Animations in Spire follow a philosophy of enhancing clarity and communication without embellishment or impedance to the user.&lt;br /&gt;
&lt;br /&gt;
In CSS there are transitions, in Spire an animation is just a value. This means that a property value such as &amp;lt;code&amp;gt;background_color&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;border_color&amp;lt;/code&amp;gt; can be directly set to an animation value to achieve a property value that changes over time.&lt;br /&gt;
&lt;br /&gt;
== Example: Rejected Style for InputBox ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TextBox_Rejected.gif|640px|center|Animation of a text input field flashing red to indicate a rejection]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the InputBox is in the &amp;lt;code&amp;gt;rejected&amp;lt;/code&amp;gt; state, an animation plays. The animation can be defined as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;css&amp;quot;&amp;gt;background_color: chain(timeout(#FFF1F1, 250ms), linear(#FFF1F1, revert, 300ms))&lt;br /&gt;
border_color: chain(timeout(#B71C1C, 550ms), revert)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In this case the value says:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Chain together two styles, the first style is a value of &amp;lt;code&amp;gt;#FFF1F1&amp;lt;/code&amp;gt; that times out after 250ms, the second value is a linear interpolation from &amp;lt;code&amp;gt;#FFF1F1&amp;lt;/code&amp;gt; to whatever the style was before (that’s what &amp;lt;code&amp;gt;revert&amp;lt;/code&amp;gt; does), over 300ms.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Border color is styled as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Chain two styles, the first is the color &amp;lt;code&amp;gt;#B71C1C&amp;lt;/code&amp;gt; that expires after 550ms and then reverts to whatever it was previously.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
This is reflected in &amp;lt;code&amp;gt;components.xd&amp;lt;/code&amp;gt; for InputBox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:InputBox_components.png|640px|center|Definition card for Input Box component]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the InputBox is &amp;lt;code&amp;gt;rejected&amp;lt;/code&amp;gt;, property declarations are made for the &amp;lt;code&amp;gt;background_color&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt; that are animation values. Whenever the InputBox is put into the &amp;lt;code&amp;gt;rejected&amp;lt;/code&amp;gt; state, the animations will play.&lt;br /&gt;
&lt;br /&gt;
Each property value is independent, and there is no necessary connection between the timing used for the animation values for each property.&lt;br /&gt;
&lt;br /&gt;
== Example: Uptick/Downtick Style for DecimalBox ==&lt;br /&gt;
&lt;br /&gt;
[[File:DecimalBox_Uptick_Downtick.gif|640px|center|Animation of a numeric input field flashing red and green alternately to indicate the direction change as its value changes]]&lt;br /&gt;
&lt;br /&gt;
When the DecimalBox uses the uptick/downtick styling, its background color flashes when its value changes, reflecting whether the value increased or decreased.&lt;br /&gt;
&lt;br /&gt;
When the value increases, it is uptick:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;css&amp;quot;&amp;gt;background_color: linear(#EBFFF0, revert, 550ms)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When the value decreases, it is downtick:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;css&amp;quot;&amp;gt;background_color: linear(#FFF1F1, revert, 550ms)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
Unlike static values, animation values use functions that allow them to change over time. The list of functions that have been used are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;chain(X, Y, *ARGS)&amp;lt;/code&amp;gt; || An animation that applies &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; until &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; ends, then applies &amp;lt;code&amp;gt;Y&amp;lt;/code&amp;gt; until &amp;lt;code&amp;gt;Y&amp;lt;/code&amp;gt; ends, and so on for any additional arguments.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;timeout(X, Y)&amp;lt;/code&amp;gt; || Applies &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; for a period of &amp;lt;code&amp;gt;Y&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;linear(X, Y, Z)&amp;lt;/code&amp;gt; || Linearly interpolates from &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Y&amp;lt;/code&amp;gt; over a period &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;linear = cubic_bezier(0.0, 0.0, 1.0, 1.0)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ease(X, Y, Z)&amp;lt;/code&amp;gt; || Interpolates from &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Y&amp;lt;/code&amp;gt; over a period &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; using the &amp;lt;code&amp;gt;ease&amp;lt;/code&amp;gt; timing function. &amp;lt;code&amp;gt;ease = cubic_bezier(0.25, 0.1, 0.25, 1.0)&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Additional functions may be added provided they have a clear use case and are documented.&lt;br /&gt;
&lt;br /&gt;
== Keywords ==&lt;br /&gt;
&lt;br /&gt;
Values within functions may be literal values (e.g. a color value or a time in milliseconds), or they may be a keyword with a defined meaning. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keyword !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;revert&amp;lt;/code&amp;gt; || Applies whatever style would have otherwise been applied.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
# [https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function Easing Functions] &lt;br /&gt;
# [https://easings.net/ Easing Functions Cheat Sheet]&lt;/div&gt;</summary>
		<author><name>Jon</name></author>
		
	</entry>
</feed>