CSS Animation Libraries: 16 Effects + Which One to Install

Licensing is the part of a CSS animations library that gets the least attention. Hover.css requires a paid license for commercial work, while the Animate.css repository names the Hippocratic License.

Below are 16 dependency-free recreations of the effects these libraries ship, followed by a guide to choosing, installing and auditing one.

By Bogdan Sandu · Updated October 28, 2026

Entrance effects without the library file

The entrances every class pack ships, rewritten as one small keyframes block each. Every demo plays when it scrolls into view and has a Replay button, and the content only hides right before it plays, so it stays readable when JavaScript or motion is off.

Fade in up on a toast

  • one from {} keyframe
  • animation-fill-mode: both
  • IntersectionObserver
Invoice INV-2041 sent Northwind Bakery gets a copy by email.
View

Plays when it scrolls into view. Use Replay to run it again.

The most used entrance in every pack: Animate.css calls it animate__fadeInUp, AOS uses data-aos="fade-up", Animista lists fade-in-bottom and tw-animate-css builds it from fade-in plus slide-in-from-bottom. Here it is a single from keyframe, opacity 0 and 28px lower, so the browser animates back to the normal style. That is two declarations instead of a 72 KB stylesheet.

View code
.al-toast {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: min(100%, 380px);
}
.al-toast__item {
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: #0f172a;
  color: #f1f5f9;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
}
.al-toast__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #22c55e;
}
.al-toast__icon::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 7px;
  width: 7px;
  height: 13px;
  border: solid #0f172a;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.al-toast__body {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
}
.al-toast__body strong {
  font-size: 15px;
}
.al-toast__body span {
  color: #b6c2d4;
}
.al-toast__link {
  margin-left: auto;
  padding: 6px 4px;
  color: #86efac;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.al-toast__link:hover {
  text-decoration: underline;
}
.al-toast__replay {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid #0f172a;
  border-radius: 999px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.al-toast__replay:hover {
  background: #e2e8f0;
}
.al-toast__replay:focus-visible,
.al-toast__link:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-toast.al-js:not(.is-play) .al-toast__item {
    opacity: 0;
  }
  .al-toast.is-play .al-toast__item {
    animation: al-fade-up .6s cubic-bezier(.2, .8, .2, 1) both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .al-toast__replay {
    display: none;
  }
}
@keyframes al-fade-up {
  from { opacity: 0; transform: translateY(28px); }
}

Bounce in on a confirm dialog

  • scale overshoot
  • percentage keyframes
  • separate backdrop fade

Delete the Q3 roadmap board?

The board and its 14 cards move to Trash for 30 days.

Plays when it scrolls into view. Use Replay to run it again.

The dialog grows from 30% to a little past full size, dips under it and settles, which is what animate__bounceIn and Animista bounce-in-fwd do. The overshoot lives in the keyframe percentages, not in the easing, so it works with any timing function. The backdrop only fades, because a bouncing overlay looks broken.

View code
.al-bounce {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: min(100%, 400px);
  min-height: 330px;
  padding: 20px 16px 64px;
  overflow: hidden;
  border-radius: 18px;
  background: #ede9fe;
}
.al-bounce__app {
  position: absolute;
  inset: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}
.al-bounce__app span {
  height: 64px;
  border-radius: 12px;
  background: #fff;
}
.al-bounce__shade {
  position: absolute;
  inset: 0;
  background: rgba(30, 27, 75, .45);
}
.al-bounce__card {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 320px);
  padding: 22px 22px 20px;
  border-radius: 18px;
  background: #fff;
  color: #1e1b4b;
  box-shadow: 0 24px 60px rgba(30, 27, 75, .35);
}
.al-bounce__icon {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #fee2e2;
}
.al-bounce__icon::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 14px;
  width: 14px;
  height: 15px;
  border: 2px solid #b91c1c;
  border-top: 0;
  border-radius: 0 0 3px 3px;
  box-sizing: border-box;
}
.al-bounce__icon::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #b91c1c;
}
.al-bounce__card h4 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.3;
}
.al-bounce__card p {
  margin: 0 0 18px;
  color: #4c4a6b;
  font-size: 14px;
  line-height: 1.5;
}
.al-bounce__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.al-bounce__btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #d4d2e6;
  border-radius: 10px;
  background: #fff;
  color: #1e1b4b;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.al-bounce__btn:hover {
  background: #f5f3ff;
}
.al-bounce__btn--danger {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}
.al-bounce__btn--danger:hover {
  background: #991b1b;
}
.al-bounce__replay {
  position: absolute;
  left: 50%;
  bottom: 16px;
  min-height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1e1b4b;
  font: inherit;
  font-size: 14px;
  translate: -50% 0;
  cursor: pointer;
}
.al-bounce button:focus-visible {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-bounce.al-js:not(.is-play) .al-bounce__card,
  .al-bounce.al-js:not(.is-play) .al-bounce__shade {
    opacity: 0;
  }
  .al-bounce.is-play .al-bounce__shade {
    animation: al-bounce-shade .3s ease-out both;
  }
  .al-bounce.is-play .al-bounce__card {
    animation: al-bounce-in .75s cubic-bezier(.25, .6, .35, 1) .1s both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .al-bounce__replay {
    display: none;
  }
}
@keyframes al-bounce-shade {
  from { opacity: 0; }
}
@keyframes al-bounce-in {
  0% { opacity: 0; transform: scale(.3); }
  45% { opacity: 1; transform: scale(1.06); }
  70% { transform: scale(.97); }
  100% { opacity: 1; transform: scale(1); }
}

Flip in X on a trip card

  • perspective() in transform
  • rotateX
  • backface-visibility
A pine-covered headland dropping steeply into a calm blue sea, with a road cut into the slope

3 nights, Sep 12 to 15

Cliffside road trip

$480 per person, car included

Plays when it scrolls into view. Use Replay to run it again.

The card tips forward from 80 degrees around its horizontal axis, swings past flat and settles, the motion behind animate__flipInX, Animista flip-in-hor-bottom and the AOS flip-up family. perspective() sits inside the transform itself, so the card needs no 3D-aware parent and the effect survives being dropped into any layout.

View code
.al-flip {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: min(100%, 320px);
}
.al-flip__card {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #fffaf2;
  color: #1c1917;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
  backface-visibility: hidden;
}
.al-flip__card img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}
.al-flip__body {
  padding: 16px 18px 18px;
}
.al-flip__meta {
  margin: 0;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 700;
}
.al-flip__body h4 {
  margin: 4px 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px;
  line-height: 1.15;
}
.al-flip__price {
  margin: 0;
  color: #57534e;
  font-size: 14px;
}
.al-flip__price strong {
  color: #1c1917;
  font-size: 18px;
}
.al-flip__replay {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid #57534e;
  border-radius: 999px;
  background: transparent;
  color: #f5f5f4;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.al-flip__replay:hover {
  background: #292524;
}
.al-flip__replay:focus-visible {
  outline: 2px solid #fdba74;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-flip.al-js:not(.is-play) .al-flip__card {
    opacity: 0;
  }
  .al-flip.is-play .al-flip__card {
    animation: al-flip-x .9s ease-out both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .al-flip__replay {
    display: none;
  }
}
@keyframes al-flip-x {
  0% { opacity: 0; transform: perspective(700px) rotateX(80deg); }
  45% { opacity: 1; transform: perspective(700px) rotateX(-16deg); }
  72% { transform: perspective(700px) rotateX(7deg); }
  100% { opacity: 1; transform: perspective(700px) rotateX(0); }
}

Back in on a message preview

  • two-phase keyframes
  • scale then settle
  • translateY

Maya Ruiz now

Can you send the final logo files before 4? The printer needs them today.

Plays when it scrolls into view. Use Replay to run it again.

A back entrance runs in two phases: the card drops into place at 72% scale, then grows to full size where it stands. Animate.css added this family in version 4 and ships this one as animate__backInDown. Splitting position and size into separate phases is what makes it feel like the card lands and then comes forward.

View code
.al-back {
  display: grid;
  justify-items: center;
  gap: 20px;
  box-sizing: border-box;
  width: min(100%, 390px);
  padding-top: 24px;
}
.al-back__card {
  display: flex;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  padding: 18px;
  border: 1px solid #fed7aa;
  border-radius: 20px;
  background: #fff7ed;
  color: #431407;
  box-shadow: 0 16px 36px rgba(124, 45, 18, .14);
}
.al-back__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #c2410c;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.al-back__body {
  min-width: 0;
}
.al-back__from {
  display: flex;
  justify-content: space-between;
  margin: 0 0 4px;
  font-size: 15px;
}
.al-back__from span {
  color: #9a3412;
  font-size: 13px;
}
.al-back__text {
  margin: 0 0 14px;
  color: #5b2a12;
  font-size: 14px;
  line-height: 1.5;
}
.al-back__actions {
  display: flex;
  gap: 8px;
}
.al-back__btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: #c2410c;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.al-back__btn--ghost {
  background: transparent;
  color: #9a3412;
}
.al-back__btn:hover {
  background: #9a3412;
  color: #fff;
}
.al-back__replay {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid #9a3412;
  border-radius: 999px;
  background: transparent;
  color: #7c2d12;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.al-back__replay:hover {
  background: #ffedd5;
}
.al-back a:focus-visible,
.al-back button:focus-visible {
  outline: 2px solid #c2410c;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-back.al-js:not(.is-play) .al-back__card {
    opacity: 0;
  }
  .al-back.is-play .al-back__card {
    animation: al-back-in .8s cubic-bezier(.3, .7, .3, 1) both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .al-back__replay {
    display: none;
  }
}
@keyframes al-back-in {
  0% { opacity: 0; transform: translateY(-150px) scale(.72); }
  65% { opacity: .85; transform: translateY(0) scale(.72); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

Light speed in on a sale banner

  • skewX
  • translateX(110%)
  • overflow: hidden parent

48-hour sale

30% off all outerwear

Shop the sale

Plays when it scrolls into view. Use Replay to run it again.

The banner races in from the right, skewed backwards as if it is braking, overshoots into the opposite skew and straightens. Animate.css renamed this effect to animate__lightSpeedInRight in version 4. The parent clips overflow, which is the Animate.css gotcha about sliding effects adding a horizontal scrollbar, solved at the source.

View code
.al-speed {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: min(100%, 400px);
  padding: 10px 0;
  overflow: hidden;
}
.al-speed__banner {
  box-sizing: border-box;
  width: calc(100% - 24px);
  padding: 22px 24px 24px;
  border-radius: 6px;
  background: #facc15;
  color: #111;
  box-shadow: 10px 10px 0 #f5f5f5;
}
.al-speed__kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 4px;
  background: #111;
  color: #facc15;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.al-speed__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.al-speed__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 4px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.al-speed__cta:hover {
  background: #333;
}
.al-speed__replay {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid #6b6b6b;
  border-radius: 999px;
  background: transparent;
  color: #f5f5f5;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.al-speed__replay:hover {
  background: #262626;
}
.al-speed__cta:focus-visible,
.al-speed__replay:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-speed.al-js:not(.is-play) .al-speed__banner {
    opacity: 0;
  }
  .al-speed.is-play .al-speed__banner {
    animation: al-speed-in .8s ease-out both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .al-speed__replay {
    display: none;
  }
}
@keyframes al-speed-in {
  0% { opacity: 0; transform: translateX(110%) skewX(-28deg); }
  60% { opacity: 1; transform: translateX(0) skewX(14deg); }
  80% { transform: translateX(0) skewX(-5deg); }
  100% { opacity: 1; transform: none; }
}

Attention seekers on real controls

Shake, pulse, jello and rubber band, tied to the action that earns them: a rejected code, a new message, an item added to the bag, a like. Each one runs a fixed number of times and never loops on its own.

Head shake on a rejected promo code

  • decaying translateX
  • aria-invalid
  • restart by reflow

Codes are not case sensitive.

Use the control in the demo to trigger the effect.

A short no-shake with shrinking steps, the job of animate__headShake, csshake shake-horizontal and Animista shake-horizontal. The motion is a bonus: the field also gets aria-invalid, a red border and a text message in a live region, so the error reads the same with motion off. Try any code, then WELCOME10.

View code
.al-promo {
  box-sizing: border-box;
  width: min(100%, 360px);
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  color: #18181b;
  box-shadow: 0 14px 34px rgba(24, 24, 27, .1);
}
.al-promo__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}
.al-promo__row {
  display: flex;
  gap: 8px;
}
.al-promo__input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 2px solid #d4d4d8;
  border-radius: 10px;
  background: #fafafa;
  color: #18181b;
  font: 600 16px ui-monospace, Consolas, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.al-promo__input[aria-invalid="true"] {
  border-color: #b91c1c;
  background: #fef2f2;
}
.al-promo.is-ok .al-promo__input {
  border-color: #15803d;
  background: #f0fdf4;
}
.al-promo__apply {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #18181b;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.al-promo__apply:hover {
  background: #3f3f46;
}
.al-promo__input:focus-visible,
.al-promo__apply:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.al-promo__msg {
  min-height: 40px;
  margin: 10px 0 0;
  color: #52525b;
  font-size: 14px;
  line-height: 1.45;
}
.al-promo:has([aria-invalid="true"]) .al-promo__msg {
  color: #b91c1c;
}
.al-promo.is-ok .al-promo__msg {
  color: #15803d;
}
@media (prefers-reduced-motion: no-preference) {
  .al-promo__row.is-shake {
    animation: al-head-shake .5s ease-in-out;
  }
}
@keyframes al-head-shake {
  0%, 100% { transform: none; }
  14% { transform: translateX(-9px); }
  30% { transform: translateX(7px); }
  46% { transform: translateX(-5px); }
  62% { transform: translateX(3px); }
  78% { transform: translateX(-1px); }
}

Attention pulse on a notification bell

  • animation-iteration-count: 3
  • ring with ::after
  • aria-label update
Studio dashboard

Use the control in the demo to trigger the effect.

A new message makes the bell swell and a ring spread out of the badge, three times, then stop. Animate.css has animate__pulse and animate__heartBeat, Hover.css has hvr-pulse and Tailwind ships animate-ping, but the Tailwind one loops forever. A fixed count keeps the cue well under the five seconds WCAG 2.2.2 allows for unstoppable motion.

View code
.al-bell {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(100%, 380px);
}
.al-bell__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px 12px 20px;
  border-radius: 16px;
  background: #1e3a8a;
  color: #fff;
  font-size: 16px;
}
.al-bell__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2b4ba8;
  color: #fff;
  cursor: pointer;
}
.al-bell__icon {
  position: relative;
  width: 18px;
  height: 16px;
  margin-top: -2px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 2px 2px;
  box-sizing: border-box;
}
.al-bell__icon::before {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.al-bell__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 6px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: currentColor;
  translate: -50% 0;
}
.al-bell__badge {
  position: absolute;
  top: 4px;
  right: 2px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  box-sizing: border-box;
  border: 2px solid #1e3a8a;
  border-radius: 999px;
  background: #fbbf24;
  color: #1e1b0a;
  font-size: 11px;
  font-weight: 800;
}
.al-bell__badge::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid #fbbf24;
  opacity: 0;
}
.al-bell__sim {
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid #1e3a8a;
  border-radius: 999px;
  background: #fff;
  color: #1e3a8a;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.al-bell__sim:hover {
  background: #eff6ff;
}
.al-bell__btn:focus-visible,
.al-bell__sim:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-bell__btn.is-pulse {
    animation: al-pulse .7s ease-in-out 3;
  }
  .al-bell__btn.is-pulse .al-bell__badge::after {
    animation: al-pulse-ring .7s ease-out 3;
  }
}
@keyframes al-pulse {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.12); }
}
@keyframes al-pulse-ring {
  0% { opacity: .9; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.2); }
}

Jello on an add-to-bag counter

  • skewX + skewY
  • decaying keyframes
  • role="status"
Fieldnote 0 items in bag

Waxed canvas tote

$38, sand

Use the control in the demo to trigger the effect.

Adding the tote makes the bag counter wobble like jelly: alternating skews on both axes that shrink every step. Animate.css calls it animate__jello and Animista splits it into jello-horizontal and jello-vertical. The motion points at the counter, while the status line tells screen reader users what changed.

View code
.al-jello {
  box-sizing: border-box;
  width: min(100%, 340px);
  padding: 18px;
  border-radius: 20px;
  background: #f7f3ea;
  color: #2d2a24;
}
.al-jello__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.al-jello__brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
}
.al-jello__bag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: #2d2a24;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.al-jello__bag-icon {
  position: relative;
  width: 16px;
  height: 14px;
  margin-top: 4px;
  border: 2px solid currentColor;
  border-radius: 2px 2px 4px 4px;
  box-sizing: border-box;
}
.al-jello__bag-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -7px;
  width: 8px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  box-sizing: border-box;
}
.al-jello__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.al-jello__product {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.al-jello__thumb {
  position: relative;
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: #e4d5b7;
}
.al-jello__thumb::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 26px;
  width: 36px;
  height: 32px;
  border-radius: 3px 3px 6px 6px;
  background: #b08d57;
}
.al-jello__thumb::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 12px;
  width: 20px;
  height: 18px;
  border: 3px solid #8a6a3b;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-sizing: border-box;
}
.al-jello__name {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
}
.al-jello__price {
  margin: 0;
  color: #5f584b;
  font-size: 14px;
}
.al-jello__add {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #3f6212;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.al-jello__add:hover {
  background: #365314;
}
.al-jello__add:focus-visible {
  outline: 2px solid #2d2a24;
  outline-offset: 3px;
}
.al-jello__status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #3f6212;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
  .al-jello__bag.is-jello {
    animation: al-jello .8s linear;
  }
}
@keyframes al-jello {
  0%, 100% { transform: none; }
  18% { transform: skewX(-11deg) skewY(-11deg); }
  34% { transform: skewX(7deg) skewY(7deg); }
  50% { transform: skewX(-4deg) skewY(-4deg); }
  66% { transform: skewX(2deg) skewY(2deg); }
  82% { transform: skewX(-1deg) skewY(-1deg); }
}

Rubber band on a like button

  • scale(x, y) squash
  • aria-pressed
  • stretch only on press

Use the control in the demo to trigger the effect.

The heart squashes wide, stretches tall and wobbles back, the same squash-and-stretch as animate__rubberBand. It only plays when the button turns on, because a selector on aria-pressed="true" carries the animation, so unliking stays calm. The pressed state, the color and the count change with or without motion.

View code
.al-like {
  display: grid;
  justify-items: start;
  box-sizing: border-box;
  width: min(100%, 320px);
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  color: #1f1720;
  box-shadow: 0 14px 34px rgba(31, 23, 32, .1);
}
.al-like__title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
}
.al-like__by {
  margin: 4px 0 18px;
  color: #6b5d6c;
  font-size: 14px;
}
.al-like__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px 0 14px;
  border: 2px solid #e5d9e5;
  border-radius: 999px;
  background: #fff;
  color: #1f1720;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.al-like__heart {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: fill .2s ease;
}
.al-like__count {
  padding-left: 10px;
  border-left: 1px solid currentColor;
  font-variant-numeric: tabular-nums;
}
.al-like__btn[aria-pressed="true"] {
  border-color: #be123c;
  background: #be123c;
  color: #fff;
}
.al-like__btn[aria-pressed="true"] .al-like__heart {
  fill: currentColor;
}
.al-like__btn:focus-visible {
  outline: 2px solid #be123c;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-like__btn[aria-pressed="true"] .al-like__heart {
    animation: al-rubber .8s ease-out;
  }
}
@keyframes al-rubber {
  0%, 100% { transform: scale(1, 1); }
  25% { transform: scale(1.35, .7); }
  40% { transform: scale(.78, 1.25); }
  55% { transform: scale(1.14, .9); }
  70% { transform: scale(.95, 1.05); }
  85% { transform: scale(1.03, .98); }
}

Panels and exit animations

Exit effects are the part people forget: the element has to stay in place until the animation ends, then leave the layout. These three wait for animationend, and skip the wait entirely when no animation runs.

Slide in from the edge, then out again

  • hidden attribute
  • animationend
  • focus return

Use the buttons inside each demo.

The bag drawer slides in from the right edge and slides back out on close, like animate__slideInRight and animate__slideOutRight or Animista slide-in-right. The exit adds a closing class, waits for animationend and only then sets hidden. When reduced motion means no animation runs, the script sees animation-name: none and hides at once instead of waiting forever.

View code
.al-drawer {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 400px);
  height: 330px;
  overflow: hidden;
  border-radius: 18px;
  background: #f1f5f4;
  color: #12302b;
}
.al-drawer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 12px 18px;
  background: #fff;
  border-bottom: 1px solid #dbe5e2;
}
.al-drawer__logo {
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}
.al-drawer__open {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #12302b;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.al-drawer__page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 18px;
}
.al-drawer__page span {
  height: 110px;
  border-radius: 12px;
  background: #dbe5e2;
}
.al-drawer__page span:first-child {
  grid-column: span 2;
  height: 70px;
}
.al-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(270px, 82%);
  padding: 16px 18px 18px;
  background: #fff;
  box-shadow: -18px 0 40px rgba(18, 48, 43, .22);
}
.al-drawer__panel[hidden] {
  display: none;
}
.al-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
}
.al-drawer__close {
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: #12302b;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.al-drawer__list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.al-drawer__list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e5ecea;
}
.al-drawer__checkout {
  display: grid;
  place-items: center;
  min-height: 48px;
  margin-top: auto;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.al-drawer__checkout:hover {
  background: #115e59;
}
.al-drawer button:focus-visible,
.al-drawer a:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-drawer__panel:not([hidden]) {
    animation: al-slide-in .45s cubic-bezier(.2, .8, .2, 1) both;
  }
  .al-drawer__panel.is-closing {
    animation: al-slide-out .3s ease-in both;
  }
}
@keyframes al-slide-in {
  from { transform: translateX(105%); }
}
@keyframes al-slide-out {
  to { transform: translateX(105%); }
}

Zoom out to close a photo

  • scale + opacity exit
  • animationend
  • state swap
A yellow tent pitched beside a dry-stone wall in deep snow, below jagged white peaks
Winter camp, day 3

Use the buttons inside each demo.

Closing the photo shrinks it to 60% while it fades, the exit animate__zoomOut and Animista scale-out-center ship. Opening runs a mirrored zoom in. The script listens for animationend before it hides the viewer, and falls back to hiding immediately when animation-name resolves to none.

View code
.al-zoom {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: min(100%, 380px);
  min-height: 330px;
  padding: 16px;
  border-radius: 18px;
  background: #0b1220;
}
.al-zoom__viewer {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.al-zoom__viewer[hidden],
.al-zoom__closed[hidden] {
  display: none;
}
.al-zoom__viewer img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.al-zoom__viewer figcaption {
  padding: 12px 14px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
}
.al-zoom__close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 18, 32, .82);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.al-zoom__closed {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #e5e7eb;
  font-size: 15px;
}
.al-zoom__closed p {
  margin: 0;
}
.al-zoom__open {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: #fde047;
  color: #0b1220;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.al-zoom button:focus-visible {
  outline: 2px solid #fde047;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-zoom__viewer.is-out {
    animation: al-zoom-out .4s ease-in both;
  }
  .al-zoom__viewer.is-in {
    animation: al-zoom-in .4s cubic-bezier(.2, .8, .2, 1) both;
  }
}
@keyframes al-zoom-out {
  to { opacity: 0; transform: scale(.6); }
}
@keyframes al-zoom-in {
  from { opacity: 0; transform: scale(.6); }
}

Hinge exit on a dismissed tip

  • transform-origin: top left
  • swing then fall
  • animationend

Tip

Press / anywhere to jump to search.

Use the buttons inside each demo.

The sticky note loses its right-hand pin, swings on the top-left corner twice and drops out of the board. That is animate__hinge, the one effect in the pack that runs at double the base duration. Pick it for something playful and disposable, never for an error, and keep the stage clipped so the falling note does not stretch the page.

View code
.al-hinge {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: min(100%, 380px);
  min-height: 320px;
  padding: 24px;
  overflow: hidden;
  border-radius: 16px;
  background: #3b2f2a;
}
.al-hinge__note {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 250px);
  padding: 26px 22px 20px;
  background: #fde68a;
  color: #3b2f2a;
  box-shadow: 0 14px 24px rgba(0, 0, 0, .35);
  rotate: -2deg;
}
.al-hinge__note::before,
.al-hinge__note::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .35);
}
.al-hinge__note::before {
  left: 10px;
}
.al-hinge__note::after {
  right: 10px;
}
.al-hinge__note[hidden],
.al-hinge__gone[hidden] {
  display: none;
}
.al-hinge__tag {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.al-hinge__text {
  margin: 0 0 16px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 21px;
  line-height: 1.3;
}
.al-hinge__dismiss {
  min-height: 40px;
  padding: 0 16px;
  border: 2px solid #3b2f2a;
  border-radius: 8px;
  background: transparent;
  color: #3b2f2a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.al-hinge__dismiss:hover {
  background: #fcd34d;
}
.al-hinge__gone {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #f5ede6;
  font-size: 15px;
}
.al-hinge__gone p {
  margin: 0;
}
.al-hinge__back {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #fde68a;
  color: #3b2f2a;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.al-hinge__dismiss:focus-visible {
  outline: 2px solid #3b2f2a;
  outline-offset: 2px;
}
.al-hinge__back:focus-visible {
  outline: 2px solid #fde68a;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-hinge__note.is-falling {
    transform-origin: 16px 15px;
    animation: al-hinge 1.6s ease-in-out both;
  }
  .al-hinge__note.is-falling::after {
    opacity: 0;
  }
}
@keyframes al-hinge {
  0% { transform: rotate(0); }
  22%, 58% { transform: rotate(76deg); }
  40%, 76% { opacity: 1; transform: rotate(58deg); }
  100% { opacity: 0; transform: translateY(420px) rotate(76deg); }
}

Typing, staggering, scrolling and a library-lite layer

Effects that usually pull in a JavaScript library: typed text, staggered lists and scroll reveals. The last demo packs the pattern into a tiny utility layer driven by data attributes and custom properties.

Typewriter in a search bar

  • steps(18)
  • ch width
  • finite caret blink

Search 2,400 recipes

miso glazed salmon

12 recipes match, sorted by cook time

None of the class packs on this page ships a typewriter, which is why people reach for a JavaScript library such as Typed.js. For a single fixed phrase CSS is enough: the query is 18 monospace characters, so the width animates from 0 to 18ch in steps(18) and each step shows one more letter. The caret blinks six times and stops.

View code
.al-type {
  display: grid;
  justify-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: min(100%, 380px);
  padding: 26px 20px 22px;
  border-radius: 22px;
  background: #fef9c3;
  color: #3f2d0b;
}
.al-type__label {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}
.al-type__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 2px solid #3f2d0b;
  border-radius: 999px;
  background: #fff;
}
.al-type__icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid #3f2d0b;
  border-radius: 50%;
  box-sizing: border-box;
}
.al-type__icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: #3f2d0b;
  transform: rotate(45deg);
}
.al-type__text {
  display: inline-block;
  box-sizing: content-box;
  width: 18ch;
  max-width: 100%;
  overflow: hidden;
  border-right: 2px solid transparent;
  font: 16px/1.5 ui-monospace, Consolas, monospace;
  white-space: nowrap;
}
.al-type__hint {
  margin: 0;
  color: #6b4f16;
  font-size: 14px;
}
.al-type__replay {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid #3f2d0b;
  border-radius: 999px;
  background: transparent;
  color: #3f2d0b;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.al-type__replay:hover {
  background: #fde68a;
}
.al-type__replay:focus-visible {
  outline: 2px solid #b45309;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-type.al-js:not(.is-play) .al-type__text {
    width: 0;
  }
  .al-type.al-js:not(.is-play) .al-type__hint {
    opacity: 0;
  }
  .al-type.is-play .al-type__text {
    animation: al-typing 1.4s steps(18) .2s both, al-caret .6s step-end 6;
  }
  .al-type.is-play .al-type__hint {
    animation: al-type-hint .4s ease-out 1.7s both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .al-type__replay {
    display: none;
  }
}
@keyframes al-typing {
  from { width: 0; }
}
@keyframes al-caret {
  0%, 100% { border-right-color: #3f2d0b; }
  50% { border-right-color: transparent; }
}
@keyframes al-type-hint {
  from { opacity: 0; transform: translateY(4px); }
}

Staggered list entrance

  • --al-i index
  • calc() delay
  • one keyframes block

Team activity, today

  • LN

    Lena merged #482 into main

  • TO

    Tomi opened a review on Billing v2

  • RS

    Rosa closed 6 issues in Search

  • DK

    Dev deployed 3.14.2 to staging

  • AM

    Amir commented on Onboarding copy

Each row carries its position in a --al-i custom property, and animation-delay is calc(var(--al-i) * 70ms), so one keyframes block plays five times in sequence. AOS does this with a data-aos-delay per element, while Motion and Anime.js have a stagger() helper. In CSS the order lives in the markup, which is all a short list needs.

View code
.al-stagger {
  display: grid;
  justify-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: min(100%, 380px);
  padding: 20px;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  box-shadow: 0 14px 34px rgba(17, 24, 39, .08);
}
.al-stagger__title {
  justify-self: start;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.al-stagger__list {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.al-stagger__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f3f4f6;
}
.al-stagger__list p {
  margin: 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.35;
}
.al-stagger__list strong {
  color: #111827;
}
.al-stagger__av {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--al-c);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.al-stagger__replay {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid #111827;
  border-radius: 999px;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.al-stagger__replay:hover {
  background: #f3f4f6;
}
.al-stagger__replay:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .al-stagger.al-js:not(.is-play) .al-stagger__list li {
    opacity: 0;
  }
  .al-stagger.is-play .al-stagger__list li {
    animation: al-stagger-in .5s cubic-bezier(.2, .8, .2, 1) both;
    animation-delay: calc(var(--al-i) * 70ms);
  }
}
@media (prefers-reduced-motion: reduce) {
  .al-stagger__replay {
    display: none;
  }
}
@keyframes al-stagger-in {
  from { opacity: 0; transform: translateX(-18px); }
}

Scroll reveal with view()

  • animation-timeline: view()
  • animation-range
  • @supports gate

Changelog. Scroll this panel.

v3.4

Offline drafts

Notes you write without a connection sync when you are back online.

v3.3

Shared folders

Invite up to 10 people to a folder and see who changed what.

v3.2

Faster search

Results now appear as you type, even in archives of 50,000 notes.

v3.1

Dark mode

Follows your system setting, or pick it in Preferences.

v3.0

New editor

Tables, checklists and code blocks with syntax colors.

The AOS fade-up without the script: each entry animates on a view() timeline, so its progress is tied to how far it has entered the scroll box, and scrolling back reverses it. Chrome 115 and Safari 26 run it, and Firefox enables it by default from version 159. The rules sit inside @supports (animation-timeline: view()), so other browsers show every entry without motion.

View code
.al-scroll {
  box-sizing: border-box;
  width: min(100%, 380px);
  height: 320px;
  padding: 18px 18px 120px;
  overflow-y: auto;
  border: 1px solid #c7d2fe;
  border-radius: 18px;
  background: #eef2ff;
  color: #1e1b4b;
}
.al-scroll:focus-visible {
  outline: 2px solid #4338ca;
  outline-offset: 2px;
}
.al-scroll__intro {
  margin: 0 0 160px;
  color: #3730a3;
  font-size: 15px;
  font-weight: 700;
}
.al-scroll__item {
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(30, 27, 75, .08);
}
.al-scroll__item span {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e0e7ff;
  color: #3730a3;
  font: 700 12px ui-monospace, Consolas, monospace;
}
.al-scroll__item h4 {
  margin: 8px 0 4px;
  font-size: 17px;
}
.al-scroll__item p {
  margin: 0;
  color: #4338ca;
  font-size: 14px;
  line-height: 1.45;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .al-scroll__item {
      animation: al-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }
  }
}
@keyframes al-reveal {
  from { opacity: 0; transform: translateY(40px) scale(.94); }
}

Utility classes with custom properties

  • [data-al] effect names
  • --al-duration / --al-delay
  • var() in keyframes

Weekly report ready
Sessions up 12% on last week.

Effect
<div class="al-animate" data-al="fade-up" style="--al-duration: 600ms">

A library-lite layer in about 25 lines: one .al-animate base class, effect names in a data-al attribute and timing in custom properties, the same split as animate__animated plus --animate-duration. Keyframes read var(--al-distance) too, so one value tunes every effect. Copy the four effects you use and you have the useful part of a class pack.

View code
.al-animate {
  --al-duration: 600ms;
  --al-delay: 0ms;
  --al-distance: 24px;
  --al-ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-reduced-motion: no-preference) {
  .al-animate.is-play {
    animation-duration: var(--al-duration);
    animation-delay: var(--al-delay);
    animation-timing-function: var(--al-ease);
    animation-fill-mode: both;
  }
  .al-animate.is-play[data-al="fade-up"] {
    animation-name: al-u-fade-up;
  }
  .al-animate.is-play[data-al="zoom-in"] {
    animation-name: al-u-zoom-in;
  }
  .al-animate.is-play[data-al="slide-left"] {
    animation-name: al-u-slide-left;
  }
  .al-animate.is-play[data-al="flip-x"] {
    animation-name: al-u-flip-x;
  }
}
@keyframes al-u-fade-up {
  from { opacity: 0; transform: translateY(var(--al-distance)); }
}
@keyframes al-u-zoom-in {
  from { opacity: 0; transform: scale(.82); }
}
@keyframes al-u-slide-left {
  from { opacity: 0; transform: translateX(calc(var(--al-distance) * 3)); }
}
@keyframes al-u-flip-x {
  from { opacity: 0; transform: perspective(600px) rotateX(75deg); }
}
.al-util {
  display: grid;
  gap: 14px;
  box-sizing: border-box;
  width: min(100%, 400px);
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}
.al-util__stage {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 12px;
  overflow: hidden;
  border-radius: 12px;
  background: #ecfeff;
}
.al-util__card {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: min(100%, 290px);
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(14, 116, 144, .16);
}
.al-util__card p {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}
.al-util__card strong {
  color: #0f172a;
}
.al-util__dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0e7490;
}
.al-util__effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.al-util__effects legend {
  margin-bottom: 6px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}
.al-util__effects label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font: 13px ui-monospace, Consolas, monospace;
  cursor: pointer;
}
.al-util__effects label:has(:checked) {
  border-color: #0e7490;
  background: #0e7490;
  color: #fff;
}
.al-util__effects input {
  margin: 0;
  accent-color: #0e7490;
}
.al-util__effects label:has(:focus-visible) {
  outline: 2px solid #0e7490;
  outline-offset: 2px;
}
.al-util__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.al-util__range {
  display: grid;
  flex: 1 1 180px;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.al-util__range output {
  font: 400 13px ui-monospace, Consolas, monospace;
}
.al-util__dur {
  width: 100%;
  min-height: 24px;
  margin: 0;
  accent-color: #0e7490;
}
.al-util__play {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.al-util__play:hover {
  background: #1e293b;
}
.al-util__play:focus-visible,
.al-util__dur:focus-visible {
  outline: 2px solid #0e7490;
  outline-offset: 2px;
}
.al-util__code {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #a5f3fc;
  font: 12px/1.5 ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}

How does a CSS animations library work?

The stylesheet ships ready-made @keyframes rules and utility classes, and an element animates as soon as it gets a class name.

The browser’s rendering engine plays the effect. No script drives the motion.

Writing a CSS animation by hand means one keyframes block plus one rule that points to it, for every effect. A library ships both pieces already written, and you pick the effects you want.

Under every effect sits a set of CSS keyframes. MDN Web Docs describes them as the element’s state at percentages from 0% to 100%, with from and to as aliases for the two ends.

The keyframe rule holds the visual states, such as opacity, translate, rotate or scale. Two classes handle the wiring. One points to the rule through animation-name, and the other (the base class) sets the shared timing defaults.

Animate.css follows this split. The animate__animated class carries the 1s default duration, and a second class such as animate__bounce names the effect (Animate.css documentation, version 4.1.1 as of October 2026).

MDN lists the properties that control a run, from animation-name and animation-duration through animation-delay, animation-iteration-count, animation-direction, animation-fill-mode, animation-timing-function and animation-play-state.

Fill mode controls how the element looks before and after a run. Animate.css defaults it to both, so an exit effect such as fadeOut stays hidden once it ends instead of snapping back.

Moving or fading an element is cheap for the browser, as long as the right properties change. MDN puts geometry and position properties such as left, margin-left, border-width, max-width and font-size in the group that triggers style recalculation, layout and repaint. Transform and opacity, which get their own layer, sit in the cheapest group.

Which CSS animations libraries are worth using?

Animate.css covers most entrance, exit and attention effects, so it’s the default pick. Animista makes sense when you only need a few effects. Hover.css is for hover states, AOS is for scroll reveals, and csshake shakes things.

Trigger type is the first filter. After that, file size and license decide it.

LibraryTriggerDeliveryLicense
Animate.cssClass togglenpm, cdnjsHippocratic License
AnimistaClass toggleDownload or copy-pasteFreeBSD
Hover.css:hover, :focus, :activenpm, Bower, zipMIT (open source), paid (commercial)
csshakeClass, hover or constantnpm, Bower, cdnjsMIT
AOSScroll positionnpm, unpkgMIT

Animate.css

Count the class names on its documentation page and you get 97 effects in 16 groups. Attention seekers (bounce, flash, pulse) are in there, along with fading, flipping, zooming and sliding entrances and exits.

The 4.1.1 minified build weighs 71,750 bytes and the raw file 95,374 bytes uncompressed, per jsDelivr’s package listing, and the minified file gzips to about 5.3 KB. One effect on its own is tiny. The fadeIn source file is 118 bytes.

The license is listed differently depending on where you look. The npm package metadata, as shown by jsDelivr, lists MIT, and so does the header of the 4.1.1 file served from npm and cdnjs. The project repository README, its LICENSE file and the documentation site name the Hippocratic License 2.1, and so does the stylesheet header on the repository’s main branch. Read the LICENSE file for the exact version you ship, especially on client work.

The same class pattern covers all 97 effects, which makes it easy to remember. Duration, delay and repeat are CSS variables, and a reduced-motion rule has been included since version 3.7.0.

The downsides are real, though. The full file loads every effect even if you use two. Custom builds need a cloned repository, not node_modules, and the license wording differs between copies, which is annoying.

Animista

Animista ships no library file.

You pick effects in the browser, adjust easing, delay, duration and fill mode, then copy or download only the CSS you chose. Minification and autoprefixer are on by default, and the easing menu includes Penner equations such as easeOutBack next to the native keywords.

Generated code is free for personal and commercial use under the FreeBSD license, according to the Animista site.

A CSS animation generator is the quicker route when you need a single custom effect instead of a catalog.

The download button relies on the HTML5 FileSystem API and works in Chrome only. Other browsers get a copy-to-clipboard option.

The payoff is the smallest payload for a handful of effects. The site is labeled beta, though, and its mobile version is unavailable.

Hover.css

Hover.css is the pick when the whole job is hover states.

Its hover effects fire on :hover, :focus and :active, as the Grow example in the README shows. Every class has carried the hvr- prefix since version 2.0.0.

For a few effects, the README recommends copying them into your own stylesheet so visitors skip the full download.

Licensing is where it gets awkward. Personal and open source use falls under MIT, but commercial use needs a paid license, required from version 2.2.0 (24 March 2017). The commercial tier names a website sold to a client as its example.

Free on your own projects, paid on client work.

csshake

csshake does one job.

Add the shake base class, then pick a modifier from shake-hard, shake-slow, shake-little, shake-horizontal, shake-vertical, shake-rotate, shake-opacity and shake-crazy.

The effect is hover-triggered by default. The shake-constant class runs it continuously instead of only on hover, and shake-freeze freezes it on hover.

Each variant also ships as its own file, such as csshake-little.css, and the package is on npm, Bower and cdnjs under an MIT license.

It’s single purpose. The README changelog ends at version 1.5.0 (October 5, 2015), and the latest npm release, 1.7.0, dates from May 2022, so don’t expect updates.

AOS

AOS reveals elements as they scroll into view, and it is the only library in this list that needs JavaScript.

It uses the MIT license, ships built-in fade, flip, slide and zoom families, and gives you per-element control through data attributes.

The default-branch README documents the aos@next tag and points to a separate page for the last stable release, version 2, so it takes a minute to work out what to install. Its custom-animation recipe builds on CSS transitions rather than keyframes.

How to install a CSS animations library

A CDN link gets you started fastest. In a bundled project, npm is the better fit, and a self-hosted file makes sense when you want control over exactly which bytes ship.

The steps below use Animate.css 4.1.1, the version its documentation lists as of October 2026.

  1. Choose the delivery method: CDN, npm or a downloaded file.
  2. For a CDN, add a stylesheet link in the head that points to the 4.1.1 animate.min.css file on cdnjs.
  3. For npm, run npm install animate.css –save and import ‘animate.css’ in the bundler entry file.
  4. Add the base class and an effect class to an element, prefix included: animate__animated animate__bounce.
  5. Confirm the element is block or inline-block, because inline elements do not animate reliably.

Choosing between CDN, npm and a self-hosted file

A CDN needs no build step. Animate.css documents cdnjs, and jsDelivr also serves the npm package with animate.min.css as its default file.

With npm, the version sits in package.json and the stylesheet joins your bundle. The documentation flags that its Yarn install needs bundling tooling such as Webpack or Parcel, so a plain HTML page is better served by the CDN link.

Self-hosting means you own the version and the exact file.

Custom builds shrink that file. Clone the Animate.css repository, delete the @import lines for effects you skip in source/animate.css, and run npm start to generate animate.css, animate.min.css and animate.compat.css.

If you copy single effects by hand, as the Hover.css README recommends, a CSS minifier produces the compressed version for production.

Upgrading from version 3

Version 4 added the animate__ prefix to every class, so a direct migration is impossible.

The animate.compat.css file keeps the unprefixed names of version 3. Switch the bundler import to animate.compat.css, or the CDN link to the 4.0.0 compat file.

New projects should use the prefixed build. The maintainers say they might discontinue the compat file in a later version.

How to trigger and customize animations

Add the effect class from a click handler, a hover rule or a scroll observer, then override –animate-duration, –animate-delay and –animate-repeat to change the timing. A variable set on :root changes every animation, and a variable set on one selector changes only that element.

Class toggling and hover

element.classList.add(‘animate__animated’, ‘animate__bounceOutLeft’) starts the effect immediately.

To detect the end, listen for animationend. MDN notes that the final loop fires animationend, not animationiteration. Then remove both classes inside the handler. A class that is already on the element starts nothing new, so replays need the removal.

The Animate.css documentation includes a short helper, animateCSS(element, animation), that adds the classes, waits for animationend, removes them and returns a Promise.

Hover triggers need no script. Hover.css responds to :hover, :focus and :active, and csshake shakes on hover by default, with shake-constant for continuous motion and shake-freeze to stop it on hover.

Scroll triggers

AOS watches scroll position and adds its animate class when an element reaches the trigger point. Call AOS.init() once, then mark elements with data-aos=”fade-up” (AOS README).

These data attributes override the global settings for a single element:

  • data-aos-offset
  • data-aos-delay
  • data-aos-duration
  • data-aos-easing
  • data-aos-once

Duration and delay accept values from 50 to 3000 ms in 50 ms steps.

AOS is one of several ways of animating on scroll with CSS, and it can also drive a keyframe pack.

To drive Animate.css from AOS, set useClassNames to true, initClassName to false and animatedClassName to the base class, then put the effect name in data-aos. The README example uses version 3 names, so swap in animate__animated and the prefixed effect names for version 4.

Animate.css defines no hidden starting state. Add a rule that sets [data-aos] to visibility: hidden and reverses it once the animated class lands, as the AOS README advises.

Timing overrides with CSS variables

Animate.css 4 defines custom properties for duration, delay and repeat, and the stylesheet sets each default to 1, which means a 1s duration, a 1s delay and one repeat.

ControlUtility classesVariable
Durationanimate__slow (2s), animate__slower (3s), animate__fast (800ms), animate__faster (500ms)–animate-duration
Delayanimate__delay-1s to animate__delay-5s–animate-delay
Repeatanimate__repeat-1 to animate__repeat-3, animate__infinite–animate-repeat

Set a variable on :root to change every animation, or on one selector to change one. This one-liner doubles the time of all animations on the page:

document.documentElement.style.setProperty('--animate-duration', '2s');

Effects shorter than 1s keep their ratio, because the library multiplies the variable with calc().

There are limits. The animate__infinite class uses no variable, so –animate-repeat does nothing to it, and the documentation advises setting –animate-repeat on the element, not globally. Gaps between repeats are impossible in pure CSS and need JavaScript.

Why is an animation not playing?

An animation that does not play usually has no usable duration, a variable the stylesheet never reads, an override with higher specificity, or an OS reduce-motion setting that shortens every effect to 1ms.

Duration is the first suspect. MDN lists auto as the initial animation-duration, which equals 0s for time-based animations, and at 0s the effect fires its events but finishes instantly, so nothing visible plays. The base class supplies one, but direct @keyframes use needs your own, as the Animate.css documentation warns.

A wrong variable name is the sneaky one. One line in the Animate.css documentation spells the variable –animation-duration, while the stylesheet defines and reads –animate-duration. The misspelled version changes nothing.

Competing declarations come next. A rule that sets animation-duration straight on the element beats the variable when it has higher specificity or comes later in the cascade. Move the value into the variable instead.

And if reduce motion is on at the OS level, the effect finishes in 1ms, the element jumps to its end state and nothing seems to play.

Chrome DevTools has an Animations panel that captures CSS animations while it is open, so trigger the effect with the panel visible. Edits to @keyframes in the Styles pane show up in the panel right away, according to Chrome for Developers.

Layout problems cause the rest, per the Animate.css gotchas.

  • If slide or bounce effects add horizontal scrollbars, set overflow: hidden on the parent of the animated element
  • If glitches spread across the whole page, the effect sits on html or body, so wrap the page content in one element and animate that

Does a CSS animations library slow a page down?

Not by itself. Runtime cost depends on which properties each effect changes. Changes to transform and opacity run on the compositor, while anything that triggers layout or paint runs on the main thread.

Which properties stay on the compositor

Chrome’s Lighthouse documentation defines a non-composited animation as any animation that triggers the Style, Layout or Paint step of the rendering pipeline. Those animations can look janky on low-end phones or while the main thread is busy.

web.dev’s compositor guide names transform and opacity as the only two properties the compositor handles alone. That guide was last updated in March 2015, so treat the list as dated and let the audit decide.

Lighthouse reports each DOM node with a non-composited animation, plus the failure reason, which turns the check into a per-element to-do list.

Layers and fill mode

Animate.css defaults animation-fill-mode to both. MDN states that a forwards fill makes the animated properties behave as if will-change were set, and an element that gained a stacking context during the run keeps it afterward.

web.dev warns that every promoted layer costs memory and GPU texture bandwidth, and on devices with limited memory the cost can outweigh the gain. Put together, finished effects that keep their classes also keep that promoted state.

So remove the classes on animationend for entrance and attention effects, since their end state matches the element’s normal style. Exit effects are the exception and stay in place until the element leaves the DOM.

Layout shift and Core Web Vitals

Lighthouse excludes composited animations from Cumulative Layout Shift, while non-composited ones can add to it because they move elements the algorithm measures.

Spendesk’s engineering team cleared a CLS flag on a marketing-site banner by replacing an animated top property with transform: translateY(). They describe the original flag as a false positive that exposed a real performance problem.

web.dev gives the same rule in two lines: use transform: scale() instead of changing height and width, and transform: translate() instead of top, right, bottom or left.

On the numbers, web.dev puts a good CLS at 0.1 or less at the 75th percentile of page loads, and anything above 0.25 counts as poor. Shifts within 500 ms of a click, tap or keypress are excluded, while scrolls, drags and pinch gestures do not count as recent input.

That exclusion window matters for scroll reveals. A scroll-triggered effect that moves an element through top, margin or height counts toward CLS, and one that uses transform does not.

Do CSS animations libraries respect reduced motion and work in every browser?

Animate.css does, through a built-in prefers-reduced-motion rule. Neither the Hover.css nor the csshake README mentions an equivalent, so those two need your own rule, and keyframe animations themselves run in every current major browser.

What the Animate.css rule does

The documentation and the stylesheet describe it differently. The accessibility page says reduced motion turns off CSS transitions, and the best-practices page says the query disables animations.

The stylesheet itself, on the project’s main branch, sets animation-duration and transition-duration to 1ms with !important inside @media print, (prefers-reduced-motion: reduce).

The effect still runs, for 1ms. Fill mode is both, so the element lands on its end state at once, and animationend still fires for any script waiting on it.

W3C lists the prefers-reduced-motion media query as technique C39 for preventing motion. The same rule applies to effects you write yourself.

Libraries without a rule

The other libraries in this comparison need a rule from you.

For Hover.css, wrap the hover classes in your own media query. The same fix works for csshake, where the shake-constant classes are the main risk. AOS has a disable setting that accepts a function, so return window.matchMedia(‘(prefers-reduced-motion: reduce)’).matches from it.

To test, open the Command Menu in Chromium DevTools, run Emulate CSS prefers-reduced-motion and reload, as Microsoft’s Edge DevTools documentation describes.

WCAG criteria for library effects

WCAG 2.2 has criteria that apply to motion from a library.

SC 2.2.2 (Level A) requires a pause, stop or hide mechanism for moving content that starts automatically, lasts more than five seconds and sits beside other content, per W3C.

SC 2.3.3 (Level AAA) lets users disable motion triggered by interaction unless the motion is needed to convey information, and W3C names parallax scrolling as a frequent offender. Hover or scroll effects with no way to pause can fail both.

In practice, an animate__infinite pulse that starts on load runs past five seconds and needs a pause control. Motion belongs in any web accessibility review next to color and keyboard checks.

Browser support

The web-features data lists CSS animations as Baseline Widely available, so Chrome, Edge, Firefox and Safari run keyframe libraries without polyfills.

Animate.css 4 also writes a fixed fallback value before each variable-based declaration, so a browser without custom property support still gets a duration.

For newer properties, check the compatibility tables on MDN or Can I use before shipping.

When is a CSS animations library the wrong choice?

Keep a CSS library for a few entrance, hover or attention effects. Move to a JavaScript library when effects need sequencing, reversal or runtime control, and to native scroll timelines when motion must follow scroll position.

A CSS class pack needs no runtime script, and the effects live in markup. The browser also decides when to render frames and can drop frames if needed, per MDN. What you give up is sequencing, reversal and mid-run control.

A JavaScript library gives you timelines, stagger, pause and reverse, plus one API for scroll, layout and gesture effects. The price is a script to load and its own reduced-motion checks.

For one or two effects, copy the keyframes by hand and skip the library. A library earns its place when the same classes repeat across templates.

Sequencing and playback control

The Web Animations API is the step up that needs no download. Element.animate(keyframes, options) returns an Animation object with pause(), reverse() and a finished promise, and MDN lists the interface as Baseline Widely available.

GSAP is free, including the former paid plugins, with commercial use covered by the standard “no charge” license. Webflow acquired GreenSock in fall 2024 and then made the whole toolset free.

The standard license does carve out solutions that compete with Webflow’s visual animation tools, so read its Prohibited Uses definition before building an animation editor.

Anime.js version 4 is modular (animate, createTimeline, stagger, onScroll) and, according to its README, free and funded by sponsors.

Component state in React

A CSS exit effect only plays while the element is still in the DOM. On unmount, delay removal until animationend, which the promise-returning helper in the Animate.css documentation can handle.

Motion (formerly Framer Motion) covers this natively. The MIT-licensed library adds layout, exit and gesture animation for React, running on the Web Animations API and ScrollTimeline where it can.

Scroll-linked effects

Native scroll-driven animations (animation-timeline with scroll() and view()) shipped in Chrome and Edge 115 in July 2023 and in Safari 26 on September 15, 2025, according to the web-platform-dx web-features data as of October 2026.

Firefox 159, released October 27, 2026, enables them by default, per MDN’s release notes. Older Firefox versions still lack them, so wrap the rules in @supports (animation-timeline: view()) and unsupported browsers show the content without motion.

Scroll-linked effects such as parallax scrolling are the strongest case for the native route. With Firefox on board, an AOS-style library is mainly a fallback for visitors on older browsers.

CSS Animations Library FAQ

What is the difference between a CSS transition and a CSS animation?

Transitions run between two states, and only when a property changes. A keyframes animation needs no trigger like that. It can run on its own, loop and pass through several steps.

Libraries such as Animate.css ship keyframes, which is why adding a class alone starts an effect.

Can I use more than one CSS animations library on the same page?

Yes, with one name check. Animate.css 4 and Hover.css prefix their classes (animate__ and hvr-), and AOS works through data attributes.

The csshake classes are plain, unprefixed shake classes, so they are the likeliest to clash with your own CSS.

Can I use Animate.css with Tailwind CSS?

Yes. Animate.css prefixes its classes with animate__, so they do not clash with Tailwind’s animate-* utilities.

Tailwind already ships animate-spin, animate-ping, animate-pulse and animate-bounce, and custom effects go in an @theme block as –animate-* variables, per the Tailwind documentation.

How do I pause or stop a CSS animation?

Set animation-play-state to paused. MDN notes that resuming picks up where the effect stopped, not from the start.

To end an effect for good, remove the effect class and the element returns to its normal style.

Can a CSS animation start from display: none?

Yes for entry effects, because an effect class starts running when the element renders. Remove display: none and add the class in the same step.

Exits need more care, since display flips instantly. A transition that includes display with allow-discrete, plus an entry state in @starting-style, handles entry and exit, and the web-platform-dx web-features data lists the pair as Baseline Newly available since Firefox 129 (August 2024). MDN’s compatibility data notes that Firefox does not yet transition display itself, so there the exit snaps instead of animating.

Does a CSS animations library affect SEO?

Only indirectly. Google’s documentation says Core Web Vitals are used by its ranking systems, and animations reach them through layout shift.

The same page states that good scores do not guarantee rankings.

What a CSS Animations Library Costs to Maintain

A CSS animations library costs little to maintain when the version is pinned and the audit is routine. The real expense is code that no upstream project updates.

The upkeep runs in a fixed order.

  • Pin the exact version, so every later check has a fixed baseline
  • Add the reduced-motion override and test it with DevTools emulation
  • Re-run the Lighthouse non-composited animations audit after each upgrade

Treat abandoned libraries as your own code. The csshake README changelog stops at version 1.5.0 from 2015 and its last npm release came out in May 2022, so copying its rules into your stylesheet removes a dependency that has gone quiet.

Pinning trades upstream fixes for stability. The stylesheet stays predictable, and every upgrade becomes a deliberate task with its own audit.