Skip to content

AnimationConfig

Grid-wide animation configuration. Controls global animation behavior - individual plugins define their own animation styles. Duration and easing values set corresponding CSS variables on the grid element.

// Enable animations regardless of system preferences
grid.gridConfig = {
animation: {
mode: 'on',
duration: 300,
easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
},
};
// Disable all animations
grid.gridConfig = {
animation: { mode: 'off' },
};
// Respect user's reduced-motion preference (default)
grid.gridConfig = {
animation: { mode: 'reduced-motion' },
};
PropertyTypeDescription
mode?AnimationModeGlobal animation mode.
duration?numberDefault animation duration in milliseconds. Sets --tbw-animation-duration CSS variable.
easing?stringDefault easing function. Sets --tbw-animation-easing CSS variable.

Default: 'reduced-motion'


Default: 200


Default: 'ease-out'


AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt