Animate In View

설명

Using a fast, simple, native technique, the Animate In View block will watch over inner blocks you add within it and when they come into the user’s view, it will simply fade and optionally slide in.

Trigger simple, smooth, modern animations as the content enters the screen.

Features

  • Both lightweight and fast, and only does one thing.
  • Set a threshold for when the block starts to animate.
  • Run only once, or each time it comes in/out of view.
  • Wrap any existing block with the Animate In block with the push of a button.
  • Transition in left, right, or neither (fade only).
  • Change the class name used to add your own custom animations.

General Tips & Tricks

  • You can wrap the currently selected block with an Animate In View block by pressing the icon toward the end of the toolbar.
  • You may need to place the block within a group block to ensure content styling is consistent. Some themes may require a group block be at the top level. Alternatively, the Animate In View block has alignment controls enabled just in case.
  • You may need to tweak things if your layouts have custom classes or styles applied. Try copy/pasting the classes, or try to nest the blocks in a way that doesn’t affect the theme styling.
  • Nest blocks to stagger animations. The animations won’t start until all are in view, then one by one. But make sure you don’t use an area too large for the viewport.
  • The Animate In View block comes with a single nested group block by default, but you may use others as well.
  • Use the list view to drag and drop blocks into the Animate In View block.
  • Open an issue if you need an assist. I’m happy to take a look.

스크린샷

  • Simple, clean, consistent animations.
  • Minimum controls to get the best results

블록

이 플러그인은 1(을)를 제공합니다.

  • Animate In View Animates a block when it comes into view.

설치

  1. Activate the plugin through the ‘Plugins’ screen in WordPress

FAQ

Can I wrap any block?

Some blocks that require a specific parent block aren’t supported. For example, buttons inside a button group, or images within an image gallery. For these you will need to remove them from their container and position them using the column or group blocks first.

Why a block and not just extend all blocks?

This keeps block functionality composable. This block is very lightweight and does the minimum it needs to keep track of the blocks on screen and just animate them in. I want to avoid adding bulk to the front end of the site, so this plugin will remain feature minimum.

후기

2022년 5월 5일 3 replies
The idea that it would be nice to implement (in certain client pages) a fading/sliding component, was one of those things somewhere lower down on my general to-do list. Yes, I could have searched out a plugin, or created my own classes and remember to add them in, but I never quite got around to it... Then I saw on WP Tavern a mention of 'Animate in View'. It's great! It does what it says on the tin and in a modern WordPress block way. (Just a word of advice for anyone that uses it, remember to drag your blocks out of the Animate in View wrapper, if you decide not to use it on a certain section, as you can't toggle it on and off, and removing the wrapper from the Block Editor will also remove what's inside). Animate in View is now joining my personal collection of handy "utility" blocks. Good Work!
모든 1 평가 읽기

기여자 & 개발자

“Animate In View”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Animate In View”(이)가 1(으)로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Animate In View”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.2.2

  • Chore: Update npm packages + test for WP 6.2

1.2.1

  • Remove package-lock file to lower download size

1.2.0

  • Add enable/disable button
  • Return function instead of component from filter

1.1.0

  • Switch to only showing once by default

1.0.4

  • Adds content overflow strategy

1.0.3

  • Adds language translation plugin

1.0.2

  • Initial release