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

Framer Motion Examples You Can Edit and Run

5 small Framer Motion examples written by AgentGid from the official docs, one feature each. Every one runs in your browser: change the code and see the result at once, or describe a change and let AI rewrite it. The screenshots are taken from the same code by our server, which also checks that each example starts without errors.

Framer Motion: usage and stats 493 AI-built projects use it

Try them all in one place

import { useState } from "react";
import { motion } from "framer-motion";

export default function App() {
  const [on, setOn] = useState(false);
  return (
    <div style={{ height: 340, padding: 30, fontFamily: "sans-serif" }}>
      <button onClick={() => setOn(!on)} style={{ padding: "8px 16px" }}>
        Toggle
      </button>
      <motion.div
        initial={{ opacity: 0 }}
        // Target values change with the `on` state
        animate={{ opacity: 1, x: on ? 300 : 0, rotate: on ? 90 : 0 }}
        transition={{ duration: 1 }}
        style={{
          width: 100,
          height: 100,
          marginTop: 60,
          borderRadius: 16,
          background: "#0368ff"
        }}
      />
      <p>x: {on ? 300 : 0}, rotate: {on ? 90 : 0}</p>
    </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.

Click Toggle to switch the box between its two animate targets. Code written by AgentGid [1]. How it works, with a screenshot →

Checked Oct 12, 2026: each example starts without errors in Chromium with framer-motion 14.1.0, react 19.3.0, react-dom 19.3.0. Needs WebGL.

Sources

  1. Docs: Motion x Framer integration guide
  2. llms.txt (docs index)
  3. Docs: Motion values overview
  4. Docs: Upgrade guide

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 Framer Motion? Ask AgentGid →