Re is out: see what's new Lifetime updates on every purchase Support replies within 24 hours Secure checkout via Gumroad 8,500+ sales since 2016

↑↓ Navigate ↵ Open Esc Close

All products
Re:Maily contact form builder is now available on WordPress.org See it live

Animations and patterns

Updated 2 min read 15 views

Entrance animations

The Animation section lists the effects of forma_animations. Each is CSS only, with no script, and replays whenever items come in:

add_filter( 'forma_animations', fn( $presets ) => $presets + [
	'flip' => [ 'label' => 'Flip', 'from' => 'opacity:0;transform:perspective(600px) rotateX(-30deg)' ],
	'wipe' => [ 'label' => 'Wipe', 'from' => 'clip-path:inset(0 100% 0 0)', 'to' => 'clip-path:inset(-30%)', 'out' => true ],
	'pop'  => [ 'label' => 'Pop', 'keyframes' => 'my-theme-pop', 'ease' => 'ease-out' ],
] );
KeyWhat it does
fromThe CSS an item starts from; it ends at its own style
toWhere it ends, for a property that can’t go back to the item’s own style. A clip-path ends at a negative inset so shadows aren’t cut
keyframesThe name of a @keyframes rule in your theme’s CSS, instead of from and to
outOn a filter or page change, the old items leave one by one with the same movement in reverse
easeA keyword, cubic-bezier() or steps()

The Animation section is part of Forma Pro.

Metro patterns

forma_metro_patterns adds patterns to the Metro picker. A pattern is the number of columns, a bar, then each tile’s width and height in columns and rows, separated by semicolons. The built-in Classic pattern is 3|2,1;1,.5;1,.5: a wide tile and two half-height tiles stacked beside it.

add_filter( 'forma_metro_patterns', fn( $patterns ) => $patterns + [
	'hero-three' => [ 'label' => 'Hero + three', 'pattern' => '3|3,1;1,1;1,1;1,1' ],
] );

forma_freeform_patterns does the same for Freeform.

Was this article helpful?