API Reference / @gtkx/animated / animated
Variable: animated
constanimated:Animated
Defined in: packages/animated/dist/animated.d.ts:20
Wraps a component so that its props accept springs and interpolations: animated(GtkLabel) is GtkLabel with every prop also taking a SpringValue or an Interpolation. Animated values are written to the widget on each frame without a React render. The wrapper of a given component is created once and reused, so repeated lookups render the same component.
Every widget component of the generated @gtkx/jsx store is also available as a property: animated.GtkLabel is animated(GtkLabel) without the import. Deprecated: property access is removed in GTKX 2.0, where animated is only callable; import the component and call animated(GtkLabel) instead, which also lets a production bundle drop the widgets an application never animates.