Components / Surfaces and motion / Enter transition

M5 · Surfaces and motion New

Enter transition

Content enters from scale 0.94 and 6 px down, fading in. Replay runs it again.

When to use

  • A panel arrives after a route or a command.
  • The motion is one shot, not a loop.

When not to use

  • The element is already on screen.
  • Reduced motion is set. The class still lands on the end state.

Usage

<article class="card enter">
  <h3>Items closed</h3>
  <p class="value num">128</p>
</article>

Variants

The preview shows the form used in the gallery.

Props

NameTypeDefaultDescription
enterclass—Runs the yr-enter keyframes once.
--enter-scale0.940.94Starting scale.
--enter-y6 px6 pxStarting offset.
--spring-panel-ms320 ms320 msDuration.

Keyboard

KeyAction
EnterOn Replay, restarts the enter class.

Accessibility

Motion

Pattern origin

Pattern type: an enter transition (scale 0.94, 6 px down, fade).

Related

Expandable islandSkeleton