Skip to content
Agents tracked: 440 Downloads (7d): 202M down 19.5% GitHub stars: 10.4M Releases (7d): 607 Agent status: 3 with issuesSince last limit reset: Claude 28d · Codex 0d Updated Oct 21, 2026

Slide-in animations in tw-animate-css

Slide classes move an element in from a direction as it enters. You can slide the full 100% or give a smaller value.

All tw-animate-css examples tw-animate-css: usage and stats

Slide-in animations in tw-animate-css: screenshot of the example below running
The code below, running in Chromium on our server (Oct 17, 2026). Press Run to see it live and change it.

How it works

  1. Choose a direction. Each tile uses a slide-in-from-* class: top, bottom, left or right. All tiles also have animate-in and fade-in. [1]
  2. Set the distance. slide-in-from-left has no value and slides the full 100%. The others add a number, such as slide-in-from-top-8. [1]
  3. Replay all tiles. The grid uses the run counter as its key, so pressing Replay mounts all four tiles again and the slides restart. [1]

Run and edit it

It runs in your browser, in a sandboxed frame that cannot see this site; the packages load from esm.sh only after you press Run.

import { useState } from 'react';

// Full class names so Tailwind can find them
const tiles = [
  { label: 'from top (8)', cls: 'slide-in-from-top-8 bg-rose-500' },
  { label: 'from bottom (8)', cls: 'slide-in-from-bottom-8 bg-amber-500' },
  { label: 'from left (100%)', cls: 'slide-in-from-left bg-emerald-500' },
  { label: 'from right (12)', cls: 'slide-in-from-right-12 bg-sky-500' },
];

export default function App() {
  const [run, setRun] = useState(0);

  return (
    <div className='flex h-[380px] flex-col items-center justify-center gap-5 overflow-hidden bg-slate-50'>
      <div key={run} className='grid grid-cols-2 gap-4'>
        {tiles.map((t) => (
          <div
            key={t.label}
            className={`animate-in fade-in duration-700 ${t.cls} flex h-24 w-48 items-center justify-center rounded-lg font-medium text-white`}
          >
            {t.label}
          </div>
        ))}
      </div>
      <button
        onClick={() => setRun(run + 1)}
        className='rounded-md bg-slate-900 px-4 py-2 text-sm text-white'
      >
        Replay
      </button>
    </div>
  );
}
Ctrl/⌘ + Enter runs

Free for signed-in members, with a daily limit. Describe the change in plain words; the new code runs only in your browser.

Each tile slides from a different side; press Replay to see them again. Code written by AgentGid [1].

Checked Oct 17, 2026: it starts without errors in Chromium with tw-animate-css 1.4.0, react 19.3.1, react-dom 19.3.1, tailwindcss 4.3.3. Needs WebGL.

More tw-animate-css examples

Exit animations with data-state in tw-animate-css Staggered delays in tw-animate-css Looping animations in tw-animate-css Enter animations in tw-animate-css

Sources

  1. tw-animate-css README (GitHub)

Explanations written by AgentGid from the official docs; the numbers in brackets point here. The code marked "written by AgentGid" is ours and free to copy.

Building something with tw-animate-css? Ask AgentGid →